All Problems
easyFunctions

Factorial

Problem Statement
Calculate the factorial of a given non-negative integer n.

SAMPLE INPUT

5

SAMPLE OUTPUT

120

CONSTRAINTS

  • 0 <= n <= 20

Explanation: Multiply all integers from 1 to n. 0! = 1.

Code Editor
Output
Click "Run" to see output...