public int trailingZeroes(int n) {
int count = 0;
while(n > 0) {
n /= 5;
count += n;
}
return count;
}
Sharing my Java solution in 1ms runtime

because Multiple of 25， example(25, 125, 625....), it can be factored 5 * 5, 5 * 5 * 5, 5 * 5 * 5 * 5, and it always can find even to multiply to have a zero.so, like this solution.
