#C5921. Factorial Calculation
Factorial Calculation
Factorial Calculation
Given an integer ( N ), compute its factorial defined as ( N! = 1 \times 2 \times \cdots \times N ) with ( 0! = 1 ). If ( N ) is 0 or 1, the answer is 1; otherwise, it is the product of all integers from 1 to ( N ). This problem tests your implementation of loops and basic arithmetic operations.
Note: The answer must be computed using standard input/output methods.
inputFormat
The input consists of a single integer ( N ) provided via standard input.
outputFormat
Output a single integer representing ( N! ) to standard output.## sample
0
1