LearnPy Hub
← Functions problems
Medium

factorial()

Write factorial(n) using a loop. Read n and print n!.

Input

One integer 0 ≤ n ≤ 30.

Output

n!

Sample 1

Input
5
Output
120

Sample 2

Input
0
Output
1
solution.py
Output appears here
factorial() · Python practice problem · LearnPy Hub