How many times will the digit 7 be written when listing the integers from 1 to 1000?

How many times will the digit 7 be written when listing the integers from 1 to 1000?

Quiz

Answer/Solution

300

Steps/Work

Another approach:
In the range 0-100:
7 as units digit - 10 times (7, 17, 27, ..., 97);
7 as tens digit - 10 time (71, 72, 73, ..., 79);
So in first one hundred numbers 7 is written 10+10=20 times.
In 10 hundreds 7 as units or tens digit will be written 10*20=200 times. Plus 100 times when 7 is written as hundreds digit (700, 701, 702, ..., 799).
Total 200+100=300.
Answer: D.