Data Structures & AlgorithmsHardGATE CS · ICPC regional

What is the sum of all positive divisors of 28, a perfect number?

  1. A. 57
  2. B. 58
  3. C. 60
  4. D. 56

Correct answer: D. 56

The divisors of 28 are 1, 2, 4, 7, 14 and 28, which sum to 56, double of 28 as the definition of a perfect number requires.

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

Exams that ask this topic