All Submissions


STATEMENT
There is a long wardrobe made up of a stack of drawers. Now,suppose you lock the first drawer.Sure enough its contents are safe and thus the first drawer is secure.
But what if you lock the second drawer while the first one is unlocked.Is the second drawer really secure?
No,it ain't. This is because you can always slide an unlocked drawer from the cupboard.
Thus we see that the first drawer can be slid out, potentially leaving the second drawer unlocked.Thus to secure the second drawer you need to lock both the first and the second drawer!

There are some important documents that are to be kept in these drawers.So you have been assigned a task to calculate the number of ways to secure exactly S drawers given the total number of drawers N.

INPUT
The input file consists of multiple test case.
For each test case there is one line containing the values of N and S.
(N = Number of drawers in the wardrobe,S = EXACT number of drawers that should be secure)
the last line of the file contains -1 and -1 which should not be processed.

OUTPUT
For each test case print the number of ways to secure exactly S drawers out of N drawers in a separate line.

CONSTRAINTS
1<=N,S<=65
Number of test cases < 3000

SAMPLE INPUT
6 4
6 3
-1 -1


SAMPLE OUTPUT
6
9


Problem Setter : Shradha Chhaparia

Languages: Brain,C,C++,Java,C#,JavaScript,Pascal,Perl,PHP,Python,Ruby,Text

Time Limit: 1 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0