Skip to content

Instantly share code, notes, and snippets.

@GreeeenApple
Created December 18, 2015 04:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GreeeenApple/eba5f8504118cbe3d174 to your computer and use it in GitHub Desktop.
Save GreeeenApple/eba5f8504118cbe3d174 to your computer and use it in GitHub Desktop.
def f(i):
if i == 0:
return 1
else:
return i * f(i - 1)
s = str(f(int(raw_input())))
i = len(s) - 1
while s[i] == "0":
i -= 1
j = i
while s[j] != "0":
j -= 1
print s[j + 1:i + 1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment