Data Structures & AlgorithmsHardGATE CS · ICPC regional

What is Euler's totient phi(360), the number of integers in [1, 360] coprime to 360?

  1. A. 96
  2. B. 97
  3. C. 98
  4. D. 100

Correct answer: A. 96

360 = 2^3 * 3^2 * 5, so phi = 360 * (1 - 1/2) * (1 - 1/3) * (1 - 1/5) = 96.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic