Data Structures & AlgorithmsVery hardCodeforces Div2 B-D · ICPC regional

What is the sum of all odd positive divisors of 180?

  1. A. 78
  2. B. 79
  3. C. 545
  4. D. 80

Correct answer: A. 78

180 = 2^2 * 3^2 * 5, so its odd divisors are the divisors of 45, with sum (1+3+9)(1+5) = 13 * 6 = 78. The sum over all divisors of 180 (second option) includes the even ones.

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

Exams that ask this topic