1 class Solution { 2 public: 3 int trailingZeroes(int n) { 4 int ret = 0; 5 while(n) 6 { 7 ret += n/5; 8 n /= 5; 9 } 10 return ret; 11 } 12 };
1 class Solution { 2 public: 3 int trailingZeroes(int n) { 4 int ret = 0; 5 while(n) 6 { 7 ret += n/5; 8 n /= 5; 9 } 10 return ret; 11 } 12 };