How many positive integers less than or equal to 2017 contain the digit 0?
(A) 469
(B) 471
(C) 475
(D) 478
(E) 481
So, 0 < n =< 2017
we need to find the number of "n"s which contain 0's.
Let's count the numbers where last digit is 0: 10, 20, 30, ... 80, 90, 100
There are 10 numbers in every hundred of numbers.
Our maximum value is 2017 (n =< 2017), we have 20 hundreds, thus 10 * 20 = 200
Now count numbers where tens digit is 0: 101, 102, 103, ... 108, 109.
We do not include here the number 100, since it was already captured in the previous calculation. The number of 0s here is 9, and we again multiply it by 20 using the same principle described above: 20 * 9 = 180
Now count numbers where hundreds digit is 0: 1000, 1001, 1002, 1003, ... 1008, 1009. Now, we know that these numbers extend till number 1099, and the next occasion is number 2000. Till number 1099, there are 100 numbers, but let us not forget about 10 numbers calculated already in the 1st step, and 9 numbers in the 2nd step. 100 - 10 - 9 = 81. In addition, we have 8 numbers in 2000s: 2010, 2011, 2012, ... 2016, 2017.
Sum all these numbers:
200 + 180 + 81 + 8 = 469
A
No comments:
Post a Comment