Skip to content

Instantly share code, notes, and snippets.

@sota1235
Created August 13, 2014 09:50
Show Gist options
  • Save sota1235/34c930d9c545a93c6b89 to your computer and use it in GitHub Desktop.
Save sota1235/34c930d9c545a93c6b89 to your computer and use it in GitHub Desktop.
AOJ #0052
# AOJ
# 0052
# python3
import math
while True:
n = int(input())
if n == 0: break
fac = str(math.factorial(n))
print(len(fac) - len(fac.rstrip('0')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment