#C14011. Recursive Factorial Computation
Recursive Factorial Computation
Recursive Factorial Computation
Calculate the factorial of a given non-negative integer using recursion.
The factorial of a number ( n ) (denoted as ( n! )) is defined as follows:
( n! = \prod_{i=1}^{n} i ) for ( n \ge 1 ) and ( 0! = 1 ).
Your task is to compute ( n! ) for an input integer ( n ) using a recursive approach.
inputFormat
The input is provided via standard input (stdin). It consists of a single non-negative integer ( n ) (where ( 0 \leq n \leq 12 )) on one line.
outputFormat
Output the factorial of ( n ) to standard output (stdout) as a single integer value.## sample
0
1