#K59947. Factorial Computation
Factorial Computation
Factorial Computation
Given a non-negative integer \(n\), compute the factorial of \(n\). The factorial, denoted by \(n!\), is defined as:
\[ n! = \begin{cases} 1, & n=0 \\ 1 \times 2 \times \cdots \times n, & n \ge 1 \end{cases} \]
Your task is to read the integer from standard input and output \(n!\) to standard output.
inputFormat
The input consists of a single line containing one non-negative integer (n). You can assume that (n) will be a small number (e.g., (n \leq 12)).
outputFormat
Print the factorial of the given integer (n) on a single line.## sample
0
1