#C9368. Factorial Calculation
Factorial Calculation
Factorial Calculation
This problem requires you to calculate the factorial of a given non-negative integer n. The factorial of an integer n is defined as:
$$n! = \prod_{i=1}^{n} i$$
with the special case defined as $$0! = 1$$. You are expected to solve this using an iterative approach (i.e. a for loop), which is efficient for the given range of input.
Note: The input will be provided via standard input and the result must be printed to standard output.
inputFormat
The input consists of a single line containing a non-negative integer n (0 <= n <= 20). It represents the number for which you need to compute the factorial.
outputFormat
Output a single number which is the factorial of n.
## sample0
1