Can you determine how many numbers from 1 to 1000 contain at least one 1?
No advanced math required for this. If you look at it the right way, it is a simple calculation.
Observing members:
0
Composing members:
0
4 Answers
Okay, there’s probably a simpler method, but here’s my workings!
1 = 1
*10 – *19 = 10×9 = 90 (only x 9 as the 100s are considered seperately below)
*21 *31 etc = 8×9 = 72 (only x 9 as the 100s are considered seperately below)
100–199 = 100
201 301 etc = 8
1000 = 1
Total = 272 ????
That is the correct answer. I think you will be interested in the general procedure, which I will post tomorrow to give others a chance of finding it.
It was not apparent when I started working on the solution that it is easier to find how many numbers do not contain a 1, which struck me as a bit counter-intuitive.
We will find how many numbers contain no ones by eliminting the numbers with a 1 a coumn at a time. Consider first the numbers whose ones column is 1. They account for 1/10 of all the numbers, so if we eliminate them we are left with 9/10 of 1000 or 900 numbers. Now let’s go to the numbers whose tens column is a 1. If you think about it a moment, you will see that again they account for 1/10 of the remaining 900 numbers. So when we eliminate them we are left with .9 * 900 = 810 numbers. Similarly, eliminating the numbers whose hundreds column is a 1 leaves .9*810=729 numbers. Finally eliminating 1000 leaves 728 numbers with no ones, which means there are 1000 – 728 = 272 numbers with at least one 1.
Note that 729 = 9^3, For the numbers from 1 to 10^n, there are 10^n – 9^n + 1 numbers with at least one 1.
Answer this question