Skip to content

Instantly share code, notes, and snippets.

@dogac00
Created March 13, 2018 23:06
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 dogac00/750c2cd2d7b295ffffd670aace6d1197 to your computer and use it in GitHub Desktop.
Save dogac00/750c2cd2d7b295ffffd670aace6d1197 to your computer and use it in GitHub Desktop.
Number of trailing zeros @codewars
def zeros(x):
i = 5
count = 0
while x >= i:
count += x // i
i *= 5
return count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment