Factorial Using Recursion
Easyjavapythonccppjavascript
Given a non-negative integer N, compute N! (the product of all integers from 1 to N; 0! = 1).
Input Format
A single line containing the integer N.
Output Format
Print N!.
Example 1
Input
5
Output
120
Explanation: 5! = 5 * 4 * 3 * 2 * 1 = 120.
- 0 <= N <= 20