Created
October 9, 2016 18:08
-
-
Save RakshithNM/53a2893dd61d5b0258f0e1121d3c76b6 to your computer and use it in GitHub Desktop.
SMALL FACTORIAL - https://www.codechef.com/problems/FCTRL2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a = int(raw_input()) | |
| nums = [] | |
| while a > 0: | |
| nums.append(int(raw_input())) | |
| a -= 1 | |
| def factorial(i): | |
| if i == 0: | |
| return 1 | |
| else: | |
| return i * factorial(i-1) | |
| for i in nums: | |
| print factorial(i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment