GATE Computer ScienceHardGATE CS (PYQ pattern)

How many integers from 1 to 1000 are divisible by exactly two of the three numbers 4, 6 and 10?

  1. A. 118
  2. B. 134
  3. C. 70
  4. D. 166

Correct answer: A. 118

Use lcms, not products: 4 & 6 → 12: 83; 4 & 10 → 20: 50; 6 & 10 → 30: 33; all three → 60: 16. Exactly two = 83 + 50 + 33 − 3·16 = 118 (subtracting 2·16 gives 'at least two' = 134; using products 24, 40, 60, 240 gives 70).

More Discrete Mathematics questions

Exams that ask this topic