#K67162. Factorial Calculation
Factorial Calculation
Factorial Calculation
You are given a non-negative integer n. Your task is to compute the factorial of n, denoted by \(n!\). The factorial is defined as:
\(n! = \begin{cases} 1 & \text{if } n = 0 \text{ or } n = 1 \\ n \times (n-1)! & \text{if } n > 1 \end{cases}\)
Please ensure that your solution reads the input from standard input (stdin) and writes the output to standard output (stdout).
inputFormat
The input consists of a single line containing a non-negative integer n.
outputFormat
Output the value of \(n!\) (the factorial of n) on a single line.
## sample5
120