Factorial Division

View as PDF

Submit solution

Points: 3 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Given two integers N and M, output \frac{N!}{M!}.

Note that the notation K! represents the product of all integers 1, 2, 3, \ldots, K.

Input Specification

The first line will contain a single integer N. N is guaranteed to be greater than or equal to 1 and less than or equal to 15.

The next line will contain a single integer M. M is guaranteed to be greater than or equal to 1 and less than or equal to N.

Output Specification

Output a single integer, the value of \frac{N!}{M!}.

Sample Input 1

5
2

Sample Output 1

60

Sample Input 2

1
1

Sample Output 2

1

Comments

There are no comments at the moment.