JEE Main 2021 · 18 March · morning · Numerical answer · +4 / −0

The number of times the digit 3 will be written when listing the integers from 1 to 1000 is :

Answer and solution

Answer 300

Solution

Maths sir · 4 steps

Pad every number to three digits and count the 3s one place at a time: units, tens, hundreds.

  1. Pad with zeros. Write 1 to 999 as three-digit strings: 001, 002, …, 999. Leading zeros add no 3s, and 1000 has no 3 either. So we can count over all strings from 000 to 999, which is 10³ = 1000 strings.
  2. Count per place. Fix a 3 in the units place. The tens and hundreds digits are then free, giving 10 × 10 = 100 strings. The same count of 100 holds for the tens place and for the hundreds place.

    Total 3s = 100ᵤₙᵢₜₛ + 100ₜₑₙₛ + 100_(hundreds) = 300

  3. No double counting. A number like 333 is counted once in each place. That is correct here, because the 3 is written three times in 333.
  4. So. The digit 3 is written 300 times.

The common slip: 271. Counting how many numbers contain at least one 3, that is 1000 - 9³, gives 271, not 300. That count treats 33 and 333 as one 3 each.

The idea to keep. When a question asks how many times a digit is written, count by place value. Pad with leading zeros so every place has all 10 digits equally often.

Answer from the NTA final answer key. Solution by PrepWiser.

Study Permutations & Combinations

Asked about 160 times in JEE Main since 2020. This question is from 2021.