Data Structures & AlgorithmsVery hardGATE CS · TCS NQT

How many integers from 1 to 100 inclusive have an odd number of positive divisors?

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

Correct answer: B. 10

A number has an odd divisor count exactly when it is a perfect square (divisors pair up otherwise). The squares up to 100 are 10 in number.

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

Exams that ask this topic