Total Accepted: 58597
Total Submissions: 178269
Difficulty: Easy
Have you met this question in a real interview?
Yes
No
Discuss Notes
class Solution {
public:
int trailingZeroes(int n) {
int ans=0;
while(n)
{
ans+=n/5;
n/=5;
}
return ans;
}
};