#C14174. Factorial Computation
Factorial Computation
Factorial Computation
You are given a non-negative integer n. Your task is to compute its factorial, denoted by \(n!\), which is defined as:
\(n! = \begin{cases} 1, & n=0, \\ n \times (n-1)!, & n > 0. \end{cases}\)
If the input integer is negative, your program should output the exact error message: "Input must be a non-negative integer."
inputFormat
The input consists of a single integer n provided via standard input (stdin). \(n\) can be any integer. Note that if \(n < 0\), the program should output an error message.
outputFormat
If \(n\) is a non-negative integer, output \(n!\) (the factorial of \(n\)) to standard output (stdout). Otherwise, if \(n\) is negative, output exactly "Input must be a non-negative integer."
## sample0
1