The number of -digit numbers that are divisible by either or but not divisible by is:
- A
- B
- C
- D
The number of -digit numbers that are divisible by either or but not divisible by is:
Correct answer:B
Standard Method
Given: We need the number of -digit numbers divisible by either or , but not divisible by .
Find: The required count.
Total -digit numbers:
Numbers divisible by :
Numbers divisible by :
Numbers divisible by both and are divisible by :
Using inclusion-exclusion, numbers divisible by either or :
Numbers divisible by :
Therefore, numbers divisible by either or but not by :
So, the correct option is B.
Inclusion-Exclusion View
Given: Count -digit numbers satisfying divisibility by or , excluding those divisible by .
Find: The exact number of such integers.
First count all -digit integers from to :
Now count multiples of each required divisor within these numbers as done in the solution:
Apply inclusion-exclusion:
Remove the numbers divisible by :
Hence, the number of such -digit numbers is . Therefore, the correct option is B.
Counting numbers divisible by and numbers divisible by separately and adding them directly gives double counting of numbers divisible by . Use inclusion-exclusion and subtract the common multiples once.
Assuming that every number divisible by must be removed without first checking that it is already included in the set divisible by or can confuse the logic. First count numbers divisible by or , then exclude multiples of from that set.
Using the total count mechanically can cause boundary errors if the range of -digit numbers is forgotten. Always verify that to contains exactly integers.
Get unlimited AI-adaptive practice, mastery tracking, and an AI tutor that explains every step — free to start.