Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

shu problem E

Posted by lin_ at 2006-10-21 13:14:12
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


Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator