I think this will work:
Since the numbers have to at least have a digit in the hundreds position, if you find how many of them there are in all the one-hundreds, you can assume the same amount in the other hundreds, except for the three-hundreds, in which every number has a 3.
For the one-hundreds:
3 in the last position: 103, 113, 123, 133, 143, 153, 163, 173, 183, 193 (10 numbers)
3 in the second position: 130, 131, 132, 134, ...139 (9 numbers, because we already counted the 133 above, where it was in the last position, so we don't want to count that number twice)
For the two-hundreds (notice that it's the same as for the one-hundreds):
3 in the last position: 203, 213, 223..293 (10 numbers)
3 in the second position: 230, 231, 232, ...239 (9 numbers, because we already counted the 233 above, where it was in the last position, so we don't want to count that number twice)
So, for the one-hundreds, there are 19, and for the two-hundreds, there are 19. This is the same for the other hundreds, except for the three-hundreds, which will have 100 numbers, since all of the three-hundreds have at least one 3 in them (in the first position).
Here is a list of how many each hundred has:
1-hundreds: 19
2-hundreds: 19
3-hundreds: 100
4-hundreds: 19
5-hundreds: 19
6-hundreds: 19
7-hundreds: 19
8-hundreds: 19
9-hundreds: 19
I'm assuming you are not including numbers that begin with a zero in the hundreds position. If you are including them, then add another 19 to the total.
The total, without zeroes in the first position, is 8 x 19 + 100 = 252.
The total, with zeroes, is 9 x 19 + 100 = 271.
874
17
There are 9000 4-digit numbers. 8*9*9*9 = 5832 of them do not contain a 5 The remaining 3168 contain a 5.
-2
-5
648
874
27: 077,177,277,377,477,577,677,877,977,717,727,737,747,757,767,777,787,797
17
There are 9000 4-digit numbers. 8*9*9*9 = 5832 of them do not contain a 5 The remaining 3168 contain a 5.
1
-2
-5
-5
It would help to know which digit. 0 appears in 9 numbers and each of the others in 18 numbers.
252
There are 6804 such numbers.