Created
April 17, 2017 09:48
-
-
Save DeviaVir/6b81bfbb28cba63fdc2f74666fea8a30 to your computer and use it in GitHub Desktop.
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
def factorial(n): | |
if n == 0: | |
return 1 | |
else: | |
return n * factorial(n-1) | |
def main(): | |
i = raw_input() | |
try: | |
i = int(i) | |
except: | |
return 1 | |
return factorial(i) | |
print(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment