Question
How many 5-digit numbers can be formed using the digits such that no digit is repeated and the number is divisible by 5?
Solution — Step by Step
A number is divisible by 5 iff its last digit is 0 or 5. So we split the count into two cases.
The last digit is fixed as 0. The first 4 positions are filled from the remaining 5 digits without repetition.
Number of such arrangements: .
The last digit is fixed as 5. The first digit cannot be 0 (else not a 5-digit number) and cannot be 5 (already used).
First digit: 4 choices (). Remaining 3 positions: filled from the 4 remaining digits in ways? Wait — we have 6 digits total, 2 used (5 at end + first digit), so 4 left for 3 positions.
Number of such arrangements: .
Total = .
Why This Works
The trick is dividing by the rule (last digit determines divisibility by 5) rather than the constraints (no zero in front, no repetition). Once we case-split, each case is just an ordered selection — basic permutation counting.
The subtle point is in Case 2: when 5 is at the end, 0 is still in our digit pool but cannot be at the front. So we count “first digit ≠ 0” separately.
For “no leading zero” problems, always handle the first position separately. After placing 5 (or whatever digit goes at the end), count first-digit options excluding 0, then fill remaining positions freely.
Alternative Method
Total 5-digit numbers using digits with last digit 0 or 5, no repeats — count directly.
Think of choosing 5 digits in order with constraint that last is 0 or 5 and first is not 0.
Method 2: count “numbers ending in 0 or 5 with no leading zero” = (all 5-digit no-repeat numbers ending in 0 or 5) − (those with leading 0). The second term is 0 (a 5-digit number can’t start with 0 anyway).
Numbers ending in 0: pick 5-digit arrangement from 6 with last = 0, first ≠ 0. Last = 0, first ≠ 0: 5 choices, then 4 × 3 × 2 = 24. Total = 5 × 24 = 120 ✓.
Numbers ending in 5: pick 5-digit arrangement from 6 with last = 5, first ≠ 0 ≠ 5. First: 4 choices, then 4 × 3 × 2 = 24. Total = 4 × 24 = 96 ✓.
Same answer.
Students often forget the “no leading zero” rule for 5-digit numbers. A “5-digit number” must have a nonzero first digit — otherwise it’s a 4-digit (or fewer) number written with a leading zero.
Final answer: 216 such numbers exist.