The number of times the digit 3 will be written when listing the integers from 1 to 1000 is ____.
Answer: 300
Solution
The digit never occurs in , so counting over to is enough. Writing every such integer as a three-digit string with leading zeros turns the list into all strings from to , and the padding adds no further s. In each of the three places the digit appears in exactly of these strings, because the other two places are free. The three places therefore contribute occurrences each, and the digit is written times.
JEE Main · 2021 · 18 Mar 2021 · Shift 1 · Integer answer