Trailing Zeroes in 100!
How many trailing zeros does 100! have?
Hint
Trailing zeros come from factors of 10, which means you need pairs of 2 and 5.
Solution
24 zeros.
Trailing zeros come from factors of 10, and 10=2×5. We need both a factor of 2 and a factor of 5 for each trailing zero. Among the numbers 1 through 100, there are 50 even numbers but only 20 multiples of 5. Even accounting for higher powers (like 4, 8, 16... contributing extra 2s, and 25, 125... contributing extra 5s), factors of 2 vastly outnumber factors of 5. So the count of trailing zeros equals the count of factors of 5.
Every 5th number contributes at least one factor of 5: 5, 10, 15, 20, ..., 100. There are 100÷5=20 such numbers.
However, some numbers contribute more than one factor of 5. Every 25th number (25, 50, 75, 100) contributes an additional factor of 5 since 25=52. There are 100÷25=4 such numbers.
Higher powers of 5 like 125=53 would contribute a third factor of 5, but 125>100, so there are no such numbers in 100!.
The total count is 20+4=24 factors of 5, which means 24 trailing zeros.
Try These Next
Guessing Hats 1
Angry with his three wise men, the evil king subjects them to an impossible task: they’ll have to guess the colour of the hats on their heads. If any one of...
100, 10, 1
Your friend, Cole, shows you his first attempt at programming: a calculator that takes in a binary sequence and does an arbitrary computation on it: If the...
Randomised Ice Cream
For Employee Day, your company is offering everyone free ice cream, and you somehow find yourself at the front of the queue. The vendor manning the ice cream...