Small Factorial
School Accuracy: 63.63% Submissions: 154 Points: 0

Calculate factorial of a given number N.
 

Example 1:

Input: 5
Output: 120
Explanation: 1 * 2 * 3 * 4 * 5 = 120.

 

Your Task:
You don't need to read or print anything. Your task is to complete the function find_fact() which takes n as input parameter and returns factorial of N.

 

Expected Time Complexity: O(N)
Expected Space Complexity: O(1)

 

Constraints:
1 <= N <= 18

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.