Originally Posted by

**abes22** How many zeros are there at the end of 2000!?

0 appears due to 5 and 2 combining. Since there are more factors of 5 than 2, the number of 0s that appear are limited by the factors of 5.Thus the number of zeros at the end of 2000! is the same as largest power of 5 in 2000!. So count the number of 5s in 2000 x 1999 x 1998 ...... x 5 x 4 x 3 x 2 x 1.

{5,10,15,20,....,2000} all have at least one factor of 5.

{25,50,75,.......,2000} all have at least two factors of 5.

{125,250,375,.......,2000} all have at least three factors of 5.

We can proceed like this to get the number of factors of 5.

Code:

Thus there are 2000/5 = 400 factors of 5
2000/25 = 80 factors of an additional 5.
2000/125 = 16 factors of yet another 5.
2000/625 = 3 factors of yet another 5.
-----------------------------------------------------------
= 499 factors of 5.

Thus there are 499 zeros at the end of 2000!.