# Find the number of zeroes at the end of 100 factorial.

+1 vote
909 views

+1 vote
by (9.9k points)
selected

We have 100! = 100 * 99 * 98 * … * 2 * 1

Now find how many multiples of 5 are there in the numbers from 1 to 100? There's 5, 10, 15, 20, 25,...

100 is the closest multiple of 5 between 1 to 100, and 100 ÷ 5 = 20, so there are twenty multiples of 5 between 1 and 100.

But, 25 is 5×5, so each multiple of 25 has an extra factor of 5 that I need to account for. How many multiples of 25 are between 1 and 100? Since 100 ÷ 25 = 4, there are four multiples of 25 between 1 and 100.

=> Adding these, I get 20 + 4 = 24 trailing zeroes in 100!