You are not logged in.
Pages: 1
How many numbers are there between 100 and 1000 having atleast one of their digit as 7?
Offline
252, I believe.
You can shear a sheep many times but skin him only once.
Offline
Can you tell me how you got this answer?
Offline
Can you tell me how you got this answer?
The digit seven occurs once every ten digits. That is to say that between 1 and ten, you will find seven once.
100 is 10 * 10, so we know seven will occur at least 10 times per 100 consecutive numbers. However, it occurs ten times from 70 to 79. We've already accounted for 77, though, so we only need to count the other 9. Thus, the digit seven occurs in 19 of the numbers between 1 and 100, inclusive.
The same holds true for the numbers between 101 and 200, between 201 and 300, etc. There are 9 blocks of 100 numbers between 100 and 1000, so, since 19 * 9 = 171, there are at least 171 numbers between 100 and 1000 that contain the digit seven.
However, all the numbers between 700 and 799 contain the digit seven. However, we are now only interested in the ones we haven't counted. Since we have already counted 19 of them, we only need to add another 81.
171 + 81 = 252
Make sense?
You can shear a sheep many times but skin him only once.
Offline
Yes.Thanks a lot.
Do we have any other method to solve it?
Any shortcut methods?
Offline
There might be a slight shortcut by working out how many numbers between 100 and 999 don't have a 7.
The first digit has a 8/9 chance of not being 7, and the other two digits both have a 9/10 chance of not being 7, so the total probability of not having a 7 is 648/900. By a happy coincidence, there are 900 numbers between 100 and 999, so now we know that 648 of them don't have a 7.
By doing 900-648, we can see that 252 numbers do have a 7.
By the way, I know that you said between 100 and 1000, but doing it up to 999 makes the maths a lot easier, and 1000 doesn't have a 7 so it doesn't change the answer.
Why did the vector cross the road?
It wanted to be normal.
Offline
Pages: 1