Zeros at the end of a product — Aptitude Question
Zeros at the end of a product: How many zeros are there at the end of the product 10 × 20 × 30 × … × 100? Answer and worked solution on CodeKairo.
- Topic: Number System
- Section: Quantitative Aptitude
- Difficulty: Hard
- Time target: 120 seconds
Question
How many zeros are there at the end of the product 10 × 20 × 30 × … × 100?
Options
- 10
- 11
- 12
- 13
Show the answer and the worked solution
Correct answer: C. 12
Worked solution
- 10 × 20 × … × 100 = 10¹⁰ × (1 × 2 × … × 10) = 10¹⁰ × 10!.
- 10¹⁰ ends in ten zeros.
- 10! = 3,628,800 has ⌊10/5⌋ = 2 trailing zeros.
- Total = 10 + 2 = 12.
Answer: 12.
The idea
Pull out the common factor of 10 from every term first — it converts the problem into a power of ten times a plain factorial, and only the factorial needs the factor-of-5 count.
Shortcut. Count fives term by term: each of the ten terms holds one, and 50 and 100 each hold a second, so 10 + 2 = 12; twos are plentiful.
Common trap. 11 — counting the zeros printed in the terms (one each in 10 to 90, two in 100); the extra five in 50 pairs with a spare 2 to make a twelfth.