The numbers from 100 to 199 can be grouped as the numbers from 100 to 119, 120 to 129, and 130 to 199.
For the numbers 100 to 119, there are 2 numbers which have the digit 2, 10 from 120 to 129, and 7 from 130 to 199.
Since the numbers from 200 to 299 start from the digit 2, all of which have 2 in every number. Thus there are 100 numbers that have the digit 2 from 200 to 299.
For the numbers from 300 to 400, the numbers may be grouped as 300 to 319, 320 to 329, and 330 to 400.
For the numbers 300 to 319, there are 2 numbers which have the digit 2, 10 from 320 to 329, and 7 from 330 to 400.
Adding up all the obtained values, we have the following sum.