GATE Computer ScienceModerateGATE CS (PYQ pattern)

How many integers in 1…1000 are coprime to 360?

  1. A. 267
  2. B. 96
  3. C. 266
  4. D. 233

Correct answer: C. 266

360 = 2³·3²·5, so we exclude multiples of 2, 3 or 5: 1000 − (500 + 333 + 200) + (166 + 100 + 66) − 33 = 266. Scaling φ(360)/360 = 4/15 to 1000 gives 266.67, rounded wrongly to 267; 96 = φ(360) counts only up to 360.

More Algorithms questions

Exams that ask this topic