1175: The Binomial Function
Result | TIME Limit | MEMORY Limit | Run Times | AC Times | JUDGE |
---|---|---|---|---|---|
3s | 8192K | 2794 | 827 | Standard |
1st Jilin University ACM International Collegiate Programming Contest
In this problem, you are to write a program to make the value of the binomial function:
where n and m are integers.
Input Specification
The input consists of several pairs of n and m(0<=n, m<=30). The end of input is marked by n=m=0, which should not be processed.
Output Specification
For each pair of n and m, you should print a line like this: "Binom(n, m) = v", where n, m and v have to be replaced by the values of n, m and v.
Sample Input
5 5 7 0 5 9 0 0
Sample Output
Binom(5, 5) = 1 Binom(7, 0) = 1 Binom(5, 9) = 32
This problem is used for contest: 110
Submit / Problem List / Status / Discuss