Skip to content

Instantly share code, notes, and snippets.

@yuchan
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save yuchan/20664a1bf8dfa4a46df7 to your computer and use it in GitHub Desktop.

Select an option

Save yuchan/20664a1bf8dfa4a46df7 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# multiply numbers between 1..30, and answer number of zeros of the tail.
num = 1
count = 0
for i in range(1,31):
num *= i
while num % 10 == 0:
num /= 10
count += 1
print count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment