Data Structures & AlgorithmsHardGATE CS · TCS NQT

How many integers in [1, 100] have an odd number of positive divisors?

  1. A. 11
  2. B. 12
  3. C. 14
  4. D. 10

Correct answer: D. 10

Divisors pair up as d and x/d, so only perfect squares have an odd count of divisors. There are 10 squares up to 100.

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

Exams that ask this topic