How many two-digit positive integers have at least one as a digit?
- A)
- B)
- C)
- D)
- E)
Answer
B
Key insight
Count the two-digit numbers with no 7 at all (8 choices for the tens digit, 9 for the units) and subtract from 90.
Solution
"At least one " is easiest to handle through its opposite, "no anywhere."
There are two-digit numbers ( through ). To build one that avoids the digit : the tens digit can be any of – except , which is options, and the units digit can be any of – except , which is options. That gives numbers with no .
Everything else contains a :
The answer is .
Why this works
"At least one" conditions are usually cleaner from the complement, because "none" is a simple product of independent digit choices, while counting directly forces you to manage an overlap. The overlap here is the number , which belongs to both the "tens digit is " group and the "units digit is " group.
Alternative approach
Direct count with overlap removed: the numbers – contribute ; the numbers contribute ; the number appears in both lists, so the total is .
The trap
Adding 10 numbers with tens digit 7 to 9 numbers with units digit 7 and answering 19, counting 77 twice.
Common mistakes
- Adding 10 numbers with tens digit 7 to 9 numbers with units digit 7 and answering 19, counting 77 twice.
- Allowing as a tens digit (or forbidding it as a units digit) in the complement count, which changes to or .
Techniques
Count the complement and subtract from the total