int Solution::trailingZeroes(int A) {

int five = 0, two = 0;

five += A/5;

five += A/25;

five += A/625;

five += (int)(A/3125);

```
return five;
```

}

It doesn’t calculate the right answer, but why?

int Solution::trailingZeroes(int A) {

int five = 0, two = 0;

five += A/5;

five += A/25;

five += A/625;

five += (int)(A/3125);

```
return five;
```

}

It doesn’t calculate the right answer, but why?

whats wrong with this code

int Solution::trailingZeroes(int A) {

```
int c = (A/5) + (A/25) + (A/125) + (A/625) + (A/3125) + (A/15625) +(A/78125) +(A/390625);
return c;
```

}

keep doing it until A/5^i for some integer i becomes zero, as the test cases aren’t in constraint 1 <= A <= 10000.