Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function zeros (n) {
- var step = 5, occurences = 0;
- do{
- occurences += Math.floor(n / step);
- step *= 5;
- }while (n / step != 0);
- return occurences;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement