How many positive, three digit integers contain atleast one 7? This is the Question: How many positive, three digit integers contain atleast one 7?
For these kind of questions I have always followed a technique of first taking care of the restriction provided in the question. The Restriction is contain atleast one 7
This is similar to the question:
In how many ways can the five letters J,K,L,M,N can be arranged such that L is not in the middle. Well for this question,taking care of the restriction,  I know that the middle letter stage can be accomplished in 4 ways since it cannot contain L, so the combination is 
$4\cdot3\cdot4\cdot2\cdot1 = 96$ ways.
But the above technique is not working for the question I asked. How to use the same technique where I first tackle with the restriction and then move on with the question.
What I tried:
Three Cases are possible:
1) Three Digits with atleast one seven: $1\cdot8\cdot7 = 56$ ways
2) Three Digits with atleast two seven: $1\cdot1\cdot8 = 8$ ways
3) Three Digits with atleast three seven: $1\cdot1\cdot1 = 1$ way
So, it should be $56\cdot8 = 448$ ways but thats wrong, The answer is 252 ways
So, how can I solve this question with the same strategy that I have followed of taking care of the restrictions first?
 A: I think the analogy with the permutations of letters is making this problem more complicated than it needs to be. 
Using the restriction that the number has at least one seven, you can first find the numbers that have exactly one $7$, then the numbers that have two $7$s, and then the number that has three $7$s and then add the results.
To find the number of numbers, think of choosing a digit for each spot: _ _ _
For one seven, you can fix a $7$ in a spot, say the first one, so the number looks like 7_ _ and note that for the other spots you can have any of the other 9 digits ($0,1,2,3,4,5,6,8,$ or $9$), so there are $9\cdot 9=81$ such numbers. 
For numbers of the forms  _ 7 _ and _ _ 7 the count is different because the first digit cannot be $0$, so there are $8\cdot 9=72$ possibilities for each.
Thus, in total there are $72+72+81=225$ three-digit positive integers with one seven as a digit.
Two sevens: For the form _77 there are 8 possibilities because the first spot cannot be 0, and for each of the forms 7_7 and _ _7 there are 9 possibilities, so in total there are $8+9+9=26$ three-digit positive integers with one seven as a digit.
Three sevens: There is only one, $777$.
So in total there are $225+26+1=252$ three-digit integers with a seven as a digit.
A: A simple way. 


*

*The first digit is 7. There are 100 of such numbers.

*The first digit is  not 7 but the second is. There are $8\cdot10=80$ such numbers.

*The first and second digit are not 7 andthe last one is 7. There are $8\cdot9=72$ (the first must be nonzero) such numbers, which gives the desired 252.
