UPSC CSAT 2024 Q45: Counting a Digit in Page Numbers — Solved

What is the number of fives used in numbering a 260-page book?

  1. 55
  2. 56
  3. 57
  4. 60

Answer: (b) 56

Solution

  1. The pages are numbered 1 to 260. Count the digit 5 in each place value separately: units, tens and hundreds. A number such as 55 has two fives, so it is counted once in the units step and once in the tens step.
  2. Units place. The numbers ending in 5 are 5, 15, 25, …, 255. This is an arithmetic sequence with common difference 10. Number of terms = (255 − 5) ÷ 10 + 1 = 25 + 1 = 26. The next one would be 265, which is beyond 260. Units-place fives = 26.
  3. Tens place. The tens digit is 5 in three blocks: - 50 to 59 → 10 numbers - 150 to 159 → 10 numbers - 250 to 259 → 10 numbers (all of them are ≤ 260) Tens-place fives = 10 + 10 + 10 = 30.

  4. Hundreds place. A hundreds digit of 5 needs page 500 or higher. The book ends at 260, so hundreds-place fives = 0.

  5. Total = 26 + 30 + 0 = 56.
  6. Cross-check by blocks. Pages 1–99 contain 10 units fives (5, 15, …, 95) and 10 tens fives (50–59), so 20 fives. Pages 100–199 contain another 20 by the same pattern. Pages 200–260: the units fives are 205, 215, 225, 235, 245, 255 (6), and the tens fives are 250–259 (10), so 16. Total = 20 + 20 + 16 = 56.
  7. Answer: 56 fives are used.

Option-wise explanation

  • a: incorrect — 55 is one short. This is the usual result when the units-place count stops at 245 and 255 is dropped, giving 25 + 30 = 55. Another route to it is counting only up to 250 in the units place.
  • b: correct — 26 units-place fives (5 to 255) plus 30 tens-place fives (50–59, 150–159, 250–259) give 56. There is no hundreds-place five below 500.
  • c: incorrect — 57 is one too many. It comes from an off-by-one in the units count, such as taking 27 terms (letting the sequence run to 265) or counting 255's units five twice.
  • d: incorrect — 60 is the result of scaling '20 fives per hundred' over three hundreds (3 × 20). That treats the book as if it ran to 299. Pages 261–299 would add 265, 275, 285 and 295 (4 fives), and 56 + 4 = 60.

How to eliminate

Use the per-hundred shortcut. Any full block of 100 pages (00–99 pattern) has exactly 20 fives: 10 in the units place and 10 in the tens place. So pages 1–199 give 40. For 200–260, count 6 units fives (205 to 255) and 10 tens fives (250–259), which gives 16. Total 56. The options are only one apart (55, 56, 57), so the boundary pages matter: check that 255 is included and that 265 is not. Reject 60 at once, because it assumes a full third hundred. Time: about 30–45 seconds. Attempt this one in the first pass.

Know more

Counting a digit from 1 to N: go place by place

For any non-zero digit d, count how many times d appears in the units place, then in the tens place, then in the hundreds place, and add the three counts. A number with a repeated digit, such as 55 or 77, is counted once in each place where d appears. That is correct, because the question asks for digits used, not numbers.

Key facts

Range Units-place d Tens-place d Total of d
1–99 10 10 20
1–999 100 100 300 (adds 100 in the hundreds place)
Each full hundred 10 10 20
  • Units place: d, d+10, d+20, … up to N. Count = (last term − d) ÷ 10 + 1.
  • Tens place: full blocks d0–d9, plus a part block if N falls inside one.
  • The digit 0 behaves differently, because page numbers have no leading zeros. Count zeros separately.

Worked variant: How many 7s are used in numbering pages 1 to 180?

  • Units: 7, 17, …, 177 → (177 − 7) ÷ 10 + 1 = 18
  • Tens: 70–79 and 170–179 → 20
  • Hundreds: none
  • Total = 38

Boundary check: Always test the last block. Is the final units term ≤ N? Is the final tens block (for example 250–259) wholly or only partly inside the range?