Last active
August 29, 2015 14:04
-
-
Save yuchan/20664a1bf8dfa4a46df7 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
| #!/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