#C13049. Factorial Calculation

    ID: 42544 Type: Default 1000ms 256MiB

Factorial Calculation

Factorial Calculation

Given a non-negative integer \( n \), compute its factorial defined as:

\( n! = \begin{cases} 1 & \text{if } n = 0,\\ n \times (n-1)! & \text{if } n \geq 1. \end{cases} \)

Your task is to write a program that reads an integer from standard input and prints its factorial to standard output.

inputFormat

The input consists of a single line with one non-negative integer ( n ).

outputFormat

Output a single line containing the factorial of ( n ).## sample

0
1