#C4938. Factorial Calculation
Factorial Calculation
Factorial Calculation
Given a positive integer n, compute the nth term of the sequence defined by:
\(a_1 = 1\) and \(a_n = a_{n-1} \times n\) for \(n > 1\), i.e., the factorial of n.
Your task is to write a program that reads an integer n from standard input and outputs \(n!\) to standard output.
Note: It is guaranteed that \(n \ge 1\). For example, when n = 5, the output should be 120.
inputFormat
The input consists of a single integer n (\(n \ge 1\)) provided via standard input.
outputFormat
Output the factorial of n (i.e., \(n!\)) to standard output.
## sample3
6
</p>