Brain Teasers · Trailing Zeros of 100!
Trailing Zeros of 100 Factorial - Play It (24)
How many zeros does 100 factorial end in? Count the fives.
How do you count trailing zeros in a factorial?
Each trailing zero is a factor of 10 = 2 x 5. In n! there are far more 2s than 5s, so the number of 5s sets the count.
Legendre's formula counts them: n/5 + n/25 + n/125 + ..., each rounded down.
How it works
One hundred factorial, 158 digits long. The story asks how many zeros it ends in. You type your answer and check it. Then you step through the answer and the breakdown.
How scoring works
This teaser checks your answer. Any correct form counts - a fraction, a decimal rounded correctly, a percent, or the number in words. You get two tries before the answer opens. A correct first try earns a ticket; a second try or opening the answer early is recorded but earns nothing. The story teasers share one lifetime unlock for free users.
The key insight
100/5 = 20 numbers contribute one 5 each, and 100/25 = 4 of them (25, 50, 75, 100) contribute a second. 125 is past 100. Total: 24.
The full step-by-step solution lives at /brain-teasers/trailing-zeros/solution.
A worked example
For 1000!: 200 + 40 + 8 + 1 = 249. Check on 10! = 3,628,800: 10/5 = 2 zeros.
Common mistakes
• Answering 20 by forgetting the extra five in 25, 50, 75 and 100.
• Counting multiples of 10 and of 5 separately, which counts some fives twice.
• Counting 2s instead of 5s.
Why interviews test this
A quick test of turning 'zeros' into 'factors of five'. Expect a follow-up on 1000!. The written solution is at /brain-teasers/trailing-zeros/solution.
Play Trailing Zeros of 100! on Outcry
Trailing Zeros of 100! is free to play on Outcry, in the Brain Teasers section, and every run is timed and scored. Read the guide once, then play Trailing Zeros of 100! and check your score against the strategy above. The guide book has a written guide for every other game, and the practice hub and mock assessments put the same skills under a real screen's clock.