Mock CCC '20 Contest 1 S1 - Depression 🤣

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Jonathan failed his math test, and now he is really sad. Although he is sad, he is still thinking about math due to the beatings and torture given to him by Mr. Fraschetti.

Jonathan is thinking about the greatest common divisor between the factorial of 2 integers. Can you help him find out?

Input Specification

The first and only line of input contains 2 integers, N and M, 1 \le N \le 10^9, 1 \le M \le 12.

Output Specification

Output the GCD between N! and M!.

Sample Input

5 3

Sample Output

6

Comments

There are no comments at the moment.