Official Solution:How many times will the digit 7 be written when listing the integers from 1 to 1000?A. 110
B. 111
C. 271
D. 300
E. 304
Multiple approaches are possible to solve this problem. Here are two:
Approach #1: Let's consider the numbers from 0 to 999, which are written using three digits:
1. 000
2. 001
3. 002
4. 003
...
1000. 999
There are a total of 1000 numbers, each of which uses 3 digits. Therefore, there are a total of \(3*1000=3000\) digits used in all these numbers. Since there is no reason for any digit to be favored over another, each of the 10 digits should be used an equal number of times. Hence, each digit (including 7) is used \(\frac{3000}{10}=300\) times.
Approach #2: Within the range of 1-100, the digit 7 appears 10 times as the units digit (7, 17, 27, ..., 97) and 10 more times as the tens digit (70, 71, 72, ..., 79). Therefore, in the first 100 numbers, the digit 7 is written a total of 10 + 10 = 20 times.
Within each block of 100 numbers (e.g., 1-100, 101-200, ..., 901-1000), the digit 7 appears 20 times as the units or tens digit. Hence, it appears as the units or tens digit 20*10 = 200 times in the 10 blocks. Additionally, the digit 7 appears 100 times as the hundreds digit (700, 701, 702, ..., 799).
Thus, the digit 7 is written a total of 200 + 100 = 300 times in the range of 0-999.
Answer: D