N-Choose-K

0

0 votes
Problem

Write a program, which repeatedly reads in a non-negative integer N followed by a second non-negative integer K, and prints out the number of ways you can choose K items from among N total items. We call this "N-choose-K", and the formula for "N-choose-K" is:

N! / (K! * (N-K)!)


Input Format:
The input consists of two integers N and K respectively.


Output Format:
The output contains a single integer indicating the result given the integers N and K.


Constraints:
0 ≤ K ≤ N

Sample Input
7 2
Sample Output
21
Time Limit: 1
Memory Limit: 256
Source Limit:
Contributers:
Editor Image

?