Jasvin ThinksPracticeMock testsCurrent affairs

UPSC Prelims 2010 Q71: Science & Technology – Quantitative Aptitude

UPSC Prelims 2010, General Studies Paper I · Science & Technology

How many numbers from 0 to 999 are NOT divisible by either 5 or 7?
  1. (a) 313
  2. (b) 341
  3. (c) 686
  4. (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.

StepCalculation
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 7200 + 143 − 29 = 314
NOT divisible by 5 or 71000 − 314 = 686

Why inclusion-exclusion is needed:

PointDetail
OverlapNumbers divisible by both 5 and 7 (i.e., by 35) are counted twice if not subtracted
RuleUnion count = (count A) + (count B) − (count of overlap)

Answer: (c) 686.

Why each option is right or wrong

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

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

Practise UPSC Prelims PYQsTake a timed mock