Created
June 15, 2011 17:48
-
-
Save ochko/1027646 to your computer and use it in GitHub Desktop.
This file contains 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_zeros_count(x): | |
res = 0 | |
div = 5 | |
while(x >= div): | |
res += x / div | |
div *= 5 | |
return res | |
n = int(input()) | |
for i in range(n): | |
x = int(input()) | |
print(factorial_zeros_count(x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment