题目描述

(Combination) In mathematics, a combination is a selection of items from a collection, such that (unlike permutations) the order of selection does not matter. If the set has n elements, the number of k-combinations is equal to the binomial coefficient.

Given two integers n and k, return the number of all possible combinations of k numbers out of n elements.


输入格式

The input consists of m (0<m<100) lines.
Each line consists of n (ranges from 1 to 10), k (ranges from 1 to n).
The last line of input consists of Int(-1).


输出格式

Output the number of all possible combinations of k numbers out of n elements.


样例数据

输入

2 1
2 2
4 2
-1

输出

2
1
6

备注


操作

评测记录

优秀代码

信息

时间限制: 1s
内存限制: 128MB
评测模式: Normal

题解