i was working on the factorial trailing zeros problem. i found the answer but i somehow fail the test for 13!. i compile my code on my own machine using g++ and get the correct answer but the site tells me i am wrong.

here is my code for reference:

```
class Solution {
public:
int trailingZeroes(int n) {
unsigned long ans = 1;
while(n > 1) {
ans *= n;
n -= 1;
}
int zeros = 0;
while(ans%10 == 0) {
ans /= 10;
zeros += 1;
if(ans == 0)
break;
}
return zeros;
}
};
```