#C6201. Recursive Factorial Computation

    ID: 49936 Type: Default 1000ms 256MiB

Recursive Factorial Computation

Recursive Factorial Computation

Given a non-negative integer M, compute its factorial recursively. Recall that the factorial of M (denoted as \(M!\)) is defined as:

\(M! = \begin{cases} 1 & \text{if } M \leq 1,\\ M \times (M-1)! & \text{if } M \geq 2. \end{cases}\)

Your task is to read an integer from standard input and output its factorial to standard output. Note that the solution should be implemented recursively without the use of iterative loops.

inputFormat

The input consists of a single non-negative integer M provided through standard input.

outputFormat

Output the factorial of M computed recursively. The result should be printed to standard output.

## sample
0
1