Guest User

Untitled

a guest
Jun 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. class Solution {
  2. public:
  3. int trailingZeroes(int n) {
  4. if (n < 5) return 0;
  5. int count = 0;
  6. while(n >= 5) {
  7. count += floor(n/5);
  8. n /= 5;
  9. }
  10. return count;
  11. }
  12. };
Add Comment
Please, Sign In to add comment