标题:大数问题
只看楼主
lianxinkai
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2006-3-3
 问题点数:0 回复次数:0 
大数问题

Lazy girl
Time Limit : 1 seconds Memory Limit : 10MB

Tracy and her classmates are learning combinatory. Today’s homework is to calculate some equation like. Tracy is a lazy girl, so she decides to calculate them with computer. Suppose you are the computer, then what’s the answer?


Input:

The input file contains several test cases. For each test case:
There’s only one line containing two integers n (n>=1) and k (0<=k<=n). Input is terminated by two zeroes for n and k.

Output:

For each test case, print one line containing the required number. This number will always fit into an 64-bit integer, i.e. it will be less than 263.

Sample Input:

4 2
10 5
49 6
0 0
Sample Output:

6
252
13983816

搜索更多相关主题的帖子: computer learning equation seconds several 
2006-10-21 14:30



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-97793-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.828987 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved