Factorial
The factorial of an integer n is defined as the product of all the integers from 1 up to n.
Write a program that given a single integer n, would print the result of n! in the output.
Input | Output |
|---|---|
1 | 1 |
5 | 120 |
0 | 1 |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB