In how many ways can N students stand in a line for the school assembly? The answer is N factorial (N!).
N! = 1 × 2 × 3 × … × N, and by definition 0! = 1.
Input Format
A single integer N.
Output Format
Print N!.
Constraints
• 0 ≤ N ≤ 20
• 20! is about 2.4 × 10^18. Use long long in C/C++ or long in Java.
Examples
Example 1
Explanation 5! = 1 × 2 × 3 × 4 × 5 = 120
Example 2
Explanation 0! is defined as 1.
Example 3
Explanation 10! = 3628800
Acceptance
—
Accepted
0
Submissions
0