Data Structures & AlgorithmsHardCodeforces Div2 B-D · ICPC regional

What is the sum of all positive divisors of 36?

  1. A. 91
  2. B. 90
  3. C. 97
  4. D. 108

Correct answer: A. 91

Use the multiplicative formula: 36 = 2^2 * 3^2 so sigma = (1+2+4)(1+3+9) = 7 * 13 = 91. Adding the divisors one at a time gives the same value.

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

Exams that ask this topic