Practice Questions
Trailing Zeroes in n!
Trailing zeroes come from factors 10 = 2×5. Count powers of 5 in n! (always fewer than powers of 2).
Formula
Trailing zeroes = ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + …
Examples
- 10! → 10/5 = 2 trailing zeroes
- 25! → 25/5 + 25/25 = 5 + 1 = 6
Highest power of p in n! (prime p): ⌊n/p⌋ + ⌊n/p²⌋ + …
-
Q1 Easy
Number of trailing zeroes in 10! is:
Explanation⌊10/5⌋ = 2 trailing zeroes. -
Q2 Medium
Trailing zeroes in 25!:
Explanation⌊25/5⌋ + ⌊25/25⌋ = 5 + 1 = 6. -
Q3 Medium
Trailing zeroes in 50!:
Explanation⌊50/5⌋ + ⌊50/25⌋ = 10 + 2 = 12. -
Q4 Medium
Trailing zeroes in 100!:
Explanation⌊100/5⌋+⌊100/25⌋+⌊100/125⌋ = 20+4+0 = 24. -
Q5 Medium
Smallest n such that n! has at least 3 trailing zeroes:
ExplanationNeed ⌊n/5⌋ ≥ 3 → n ≥ 15. -
Q6 Hard
Highest power of 3 in 20! is:
Explanation⌊20/3⌋+⌊20/9⌋+⌊20/27⌋ = 6+2+0 = 8. -
Q7 Easy
Trailing zeroes in 15!:
Explanation⌊15/5⌋ = 3.
-
Q8 Easy
Trailing zeroes in 7!:
Explanation⌊7/5⌋ = 1. -
Q9 Hard
How many trailing zeroes in 125!?
Explanation⌊125/5⌋+⌊125/25⌋+⌊125/125⌋ = 25+5+1 = 31. -
Q10 Easy
Trailing zeroes in 30!:
Explanation⌊30/5⌋ + ⌊30/25⌋ = 6 + 1 = 7. -
Q11 Medium
n! ends with exactly 1 zero. Largest such n below 20:
ExplanationNeed one factor 5: n=5..9 give 1 zero. Largest below 20 with exactly 1: 14 (15 adds second). -
Q12 Medium
Power of 5 in 40! is:
Explanation⌊40/5⌋+⌊40/25⌋ = 8+1 = 9. -
Q13 Easy
Trailing zeroes in 5!:
Explanation5! = 120 → one trailing zero. -
Q14 Hard
Trailing zeroes in 200!:
Explanation⌊200/5⌋ + ⌊200/25⌋ + ⌊200/125⌋ = 40 + 8 + 1 = 49.
-
DS1 Easy
How many trailing zeroes in n!?
Statement In = 25.
Statement IIn is greater than 20.
Explanation25! has ⌊25/5⌋+⌊25/25⌋ = 6 trailing zeroes. Statement II alone does not fix n. -
DS2 Easy
How many trailing zeroes in 50!?
Statement I50! has 12 trailing zeroes.
Statement II50 is divisible by 10.
ExplanationStatement I directly gives the answer. Statement II is true but insufficient alone.
-
DS3 Hard
What is the smallest n such that n! has at least 5 trailing zeroes?
Statement I⌊n/5⌋ ≥ 5.
Statement IIn is a multiple of 5.
ExplanationNeed n ≥ 25. Statement I alone: smallest n with ⌊n/5⌋ ≥ 5 is 25. Statement II alone insufficient. -
DS4 Medium
What is the highest power of 5 in 30!?
Statement I30! = 2^a × 3^b × 5^c × …
Statement IIc = 7.
ExplanationStatement II directly gives c = 7. Statement I alone does not compute c without calculation.