UPSC CSAT 2023 Q29: Sum of All Digits from 10 to 100 — Solved

What is the sum of all digits which appear in all the integers from 10 to 100?

  1. 855
  2. 856
  3. 910
  4. 911

Answer: (b) 856

Solution

  1. Split the range into two parts: the two-digit numbers 10 to 99, and the single number 100. Add the digit sums of each part.
  2. Count the two-digit numbers. From 10 to 99 there are 99 − 10 + 1 = 90 numbers. Each has a tens digit and a units digit. Add the two places separately.
  3. Tens place (10 to 99). The tens digit runs from 1 to 9. Each value covers a block of 10 numbers: 10–19 have tens digit 1, 20–29 have 2, and so on up to 90–99. - Each tens digit appears 10 times. - Tens-place sum = 10 × (1 + 2 + … + 9) = 10 × 45 = 450.

  4. Units place (10 to 99). In each of the 9 blocks (10s, 20s, …, 90s), the units digit runs once through 0, 1, 2, …, 9. - Each units digit appears 9 times, once per block. - Units-place sum = 9 × (0 + 1 + … + 9) = 9 × 45 = 405.

  5. Digit sum of 10 to 99 = 450 + 405 = 855.

  6. The number 100. Its digits are 1, 0, 0. Digit sum = 1.
  7. Total = 855 + 1 = 856.
  8. Check with the mod 9 rule. A number leaves the same remainder on division by 9 as its digit sum does. So the total digit sum must leave the same remainder as the sum of the numbers themselves. - Sum of 10 to 100 = (10 + 100) × 91 ÷ 2 = 110 × 91 ÷ 2 = 5005. - 5005 → 5 + 0 + 0 + 5 = 10 → remainder 1 when divided by 9. - 856 → 8 + 5 + 6 = 19 → remainder 1. It matches.

Answer: 856

Option-wise explanation

  • a: incorrect — 855 is the digit sum of 10 to 99 only. It leaves out the number 100, which adds 1. This is the main trap: the range says 'to 100', so the endpoint counts. The mod 9 check also rejects it, since 855 leaves remainder 0 and the total must leave remainder 1.
  • b: correct — Tens digits give 10 × 45 = 450 and units digits give 9 × 45 = 405, so 10 to 99 totals 855. Adding 1 for the number 100 gives 856. It leaves remainder 1 on division by 9, the same as 5005, the sum of the numbers.
  • c: incorrect — 910 is 54 more than the correct total. No careful place-by-place count produces it. It passes the mod 9 check (remainder 1), so you need the estimate to rule it out: 90 two-digit numbers with an average digit sum of about 9.5 give roughly 855, not 910.
  • d: incorrect — 911 is 910 plus 1 for the number 100, so it rests on the same overcount. It also fails the mod 9 check: 9 + 1 + 1 = 11, which leaves remainder 2, not 1.

How to eliminate

Route 1: mod 9 test plus a rough estimate (no full count needed).

  • Digit sum ≡ number (mod 9), so the total digit sum ≡ 10 + 11 + … + 100 = 5005 ≡ 1 (mod 9).
  • Remainders of the options on division by 9: 855 → 0, 856 → 1, 910 → 1, 911 → 2. Drop 855 and 911.
  • Estimate: the 90 two-digit numbers have an average tens digit of 5 and an average units digit of 4.5. That gives 90 × 9.5 = 855. Add about 1 for the number 100 and you land near 856, not 910.

Route 2: direct count (also quick). Tens: 45 × 10 = 450. Units: 45 × 9 = 405. Sum 855, plus 1 for 100 = 856. Make sure you check the endpoint 100. The 855 option is there for anyone who forgets it.

Time: about 45–60 seconds once you know the 'each digit appears equally often' idea. Attempt it in the first pass. It is a sure mark.

Know more

Digit sums over a range: count each place separately

To add every digit in a run of numbers, do not add the numbers one by one. Fix one place at a time: units, tens, hundreds. Count how often each digit 0–9 shows up in that place, then multiply by the digit sum 0 + 1 + … + 9 = 45.

From 0 to 10^n − 1 (all n-digit strings, with leading zeros allowed), each digit appears 10^(n−1) times in every one of the n places. So:

Digit sum of 1 to (10^n − 1) = 45 × n × 10^(n−1)

Range Formula Digit sum
1–9 45 × 1 × 1 45
1–99 45 × 2 × 10 900
1–999 45 × 3 × 100 13,500
1–9999 45 × 4 × 1000 180,000

For other ranges, take the nearest full block and adjust. In this question, 1–99 gives 900. Remove 1–9 (45) to get 855. Add 100 (1) to get 856.

Worked variant: the digit sum of 100 to 199.

  • Hundreds: 100 numbers × 1 = 100
  • Tens: each digit 0–9 appears 10 times → 45 × 10 = 450
  • Units: each digit 0–9 appears 10 times → 45 × 10 = 450
  • Total = 1000

Always check with mod 9: the digit sum and the plain sum of the numbers leave the same remainder on division by 9. For 100 to 199, the sum of the numbers is 14,950 → remainder 1. And 1000 → remainder 1. ✓