UPSC Prelims 2010 Q71: Science & Technology – Quantitative Aptitude
How many numbers from 0 to 999 are NOT divisible by either 5 or 7?
- (a) 313
- (b) 341
- (c) 686
- (d) 786
Answer: (c) 686
Explanation
Counting numbers from 0 to 999 NOT divisible by 5 or 7
Use the inclusion-exclusion principle to find numbers divisible by 5 or 7, then subtract from the total.
| Step | Calculation |
|---|---|
| Total numbers (0 to 999) | 1000 numbers |
| Divisible by 5 | ⌊999/5⌋ + 1 = 200 |
| Divisible by 7 | ⌊999/7⌋ + 1 = 143 |
| Divisible by both 5 and 7 (i.e., by 35) | ⌊999/35⌋ + 1 = 29 |
| Divisible by 5 OR 7 | 200 + 143 − 29 = 314 |
| NOT divisible by 5 or 7 | 1000 − 314 = 686 |
Why inclusion-exclusion is needed:
| Point | Detail |
|---|---|
| Overlap | Numbers divisible by both 5 and 7 (i.e., by 35) are counted twice if not subtracted |
| Rule | Union count = (count A) + (count B) − (count of overlap) |
Answer: (c) 686.
Why each option is right or wrong
- (a) Incorrect. 313 does not match the correct inclusion-exclusion calculation.
- (b) Incorrect. 341 also does not match the correct result.
- (c) CORRECT. 1000 − (200 + 143 − 29) = 1000 − 314 = 686.
- (d) Incorrect. 786 overstates the count of numbers not divisible by 5 or 7.
Key point
Using inclusion-exclusion: numbers divisible by 5 or 7 from 0-999 = 200+143−29 = 314. So numbers NOT divisible by either = 1000−314 = 686.
Remember
0-999, not divisible by 5 or 7: 1000 − (200+143−29) = 686.
Common mistakes
- Forgetting to subtract the overlap (numbers divisible by 35), double-counting them.
- Making an off-by-one error when counting multiples within an inclusive range (0 to 999).
- Confusing 'divisible by 5 or 7' with 'divisible by 5 and 7' in the final subtraction step.
Exam tip
For 'not divisible by A or B' problems: total − (divisible by A + divisible by B − divisible by both) = answer. Classic inclusion-exclusion.
Sources
- NCERT Class XI Mathematics — Sets
- Arun Sharma — How to Prepare for Quantitative Aptitude for the CAT (Number System)