Binomial theorem
Description In mathematics, the binomial theorem is an important formula giving the expansion of powers of sums. Its simplest version states that
for any real or complex numbers x and y, and any nonnegative integer n. The binomial coefficient appearing in (1) may be defined in terms of the factorial function n!:
For example, here are the cases where 2 ≤ n ≤ 5:
History
This formula and the triangular arrangement of the binomial coefficients are often attributed to Blaise Pascal, who described them in the 17th century. But they were known to many mathematicians who preceded him: 4th century B.C. Greek mathematician Euclid, 3rd century B.C. Indian mathematician Pingala, 11th century Persian mathematician Omar Khayyám, and 13th century Chinese mathematician Yang Hui all derived similar results.
There have an other formula compute C(n,k):
C(n,k)=C(n-1,k-1)+C(n-1,k)
Your task is this formula above compute C(n,k).
Input
多组测试数据,每组提供n和k。以0,0结束。
Output
C(n,k)的结果。
Sample Input
2 1
3 1
4 4
10 6
0 0
Sample Output
2
3
1
210