#C13036. Recursive Factorial Computation

    ID: 42530 Type: Default 1000ms 256MiB

Recursive Factorial Computation

Recursive Factorial Computation

This problem requires you to compute the factorial of a non-negative integer n using recursion. The factorial of a number is defined as:

\( n! = n \times (n-1)! \) for \( n \geq 1 \) and \( 0! = 1 \).

Your task is to implement a recursive function to calculate \( n! \) and output the result. Ensure that your solution reads input from stdin and writes the result to stdout.

inputFormat

A single non-negative integer ( n ) provided via standard input.

outputFormat

The factorial of ( n ) computed using recursion. The result should be printed to standard output.## sample

0
1