Home ›
SSC ›
SSC CGL ›
Maths ›
Number System ›
Trailing Zeros in n!
15. Trailing Zeros in n! (Factorial)
Factorial n! me trailing zeros kaise nikalte hain: v5 method, Legendre link, trailing zeros in base 10, base power (10^k) divisibility, ending zeros in expressions, SSC CGL examples & practice with answers.
1) Trailing zeros kya hote hain?
Trailing zeros = number ke end me aane wale continuous zeros.
Example: 12000 me trailing zeros = 3.
2) Factorial me zeros kahan se aate hain?
Zero end me tab aata hai jab number me factor 10 ho.
Aur 10 = 2 × 5 .
Factorial (n!) me 2 ka count bahut zyada hota hai, isliye limiting factor 5 hota hai.
So, trailing zeros in n! = number of 5s in n! = v5 (n!)
3) Direct formula (most important)
Trailing zeros in n! = ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + ...
Reason: multiples of 5 give one 5, multiples of 25 give extra one 5, multiples of 125 give extra one 5, etc.
4) Examples (SSC CGL)
Example 1: Trailing zeros in 10!
⌊10/5⌋ = 2, ⌊10/25⌋ = 0
⇒ zeros = 2
Example 2: Trailing zeros in 25!
⌊25/5⌋ + ⌊25/25⌋ = 5 + 1 = 6
Example 3: Trailing zeros in 100!
⌊100/5⌋ + ⌊100/25⌋ + ⌊100/125⌋
= 20 + 4 + 0
= 24
5) “n! is divisible by 10^k” type
Agar n! me trailing zeros = t, to n! divisible by 10k tab hoga jab t ≥ k .
Example: 100! me t=24 ⇒ 100! divisible by 1020 (Yes), 1030 (No)
6) Trailing zeros in (n!)^m
(n!)m me factors repeat hote hain, so:
zeros = m × zeros(n!)
Example: zeros in (25!)3 = 3×6 = 18
7) Trailing zeros in product/division type (basic idea)
Product me zeros add up (v5 add), division me subtract (if divisible).
SSC me common:
zeros in (100! / 50!) = v5(100!) − v5(50!)
zeros in (n! × 10^k) = zeros(n!) + k
Example 4: Trailing zeros in 100!/50!
v5(100!) = 20+4 = 24
v5(50!) = ⌊50/5⌋+⌊50/25⌋ = 10+2 = 12
So zeros = 24 − 12 = 12
8) Tricky but common: trailing zeros in n!!? (not double factorial)
SSC me usually n! hi puchte hain. Agar kabhi “consecutive products” diye ho (like 1×2×...×n) wo n! hi hota hai.
9) Common traps
Sirf ⌊n/5⌋ lena enough nahi (25,125 extra 5s dete hain).
2 count karne ki zaroorat nahi (factorial me 2 always more than 5).
Trailing zeros means end ke zeros, beech ke zeros nahi.
10) Practice (SSC CGL) + Answers
Find trailing zeros in 30!.
Find trailing zeros in 50!.
Find trailing zeros in 125!.
How many trailing zeros in (20!)2 ?
How many trailing zeros in 100!/25! ?
Maximum k such that 200! is divisible by 10k ?
Show Answers
⌊30/5⌋+⌊30/25⌋ = 6 + 1 = 7
⌊50/5⌋+⌊50/25⌋ = 10 + 2 = 12
⌊125/5⌋+⌊125/25⌋+⌊125/125⌋ = 25 + 5 + 1 = 31
zeros(20!) = ⌊20/5⌋ = 4 ⇒ (20!)2 zeros = 2×4 = 8
v5(100!)=24; v5(25!)=6 ⇒ zeros = 24−6 = 18
zeros(200!) = ⌊200/5⌋+⌊200/25⌋+⌊200/125⌋ = 40 + 8 + 1 = 49