Alright so I've attempted to complete two problems from this site one of which I'm done with(The small factorial challenge). The one I'm stuck on is the trailing zeros one. The algorithm that I created was by finding out that a good portion of the factorial numbers created a trailing zero every time you increment by 5(2 zeros after incrementing by 5 five times). For the most, my theory was correct. But when I inputted 1024! I got 244 trailing zeros when the site says it's 253. Where do you think I when wrong?
for(int i=1; i<=N; i++) {
/*
1. count how many zeros are at the end of each numbers, add them
2. find how many pairs (5,2) || (5,4) || (5,6) || (5,8) -> pairs are from the end of two numbers(which you are multiplying), discarding zeros
*/
}