Data Structures & AlgorithmsVery hardCodeforces Div2 B-D · ICPC regional
What is the sum of all odd positive divisors of 180?
- A. 78
- B. 79
- C. 545
- 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.
Practise more Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questionsArrays, Strings, Linked Lists, Stacks, Queues and Hashing: notes and key points
More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions
- How many distinct sums arise from the length-3 windows of [1, 1, 2, 2, 3, 3, 1]?
- Among index pairs i < j of [-8, -3, -1, 2, 5, 9], how many pairs have the minimum possible absolute value of their sum?
- For [4, 1, 3, 7, 2], what is the maximum over index pairs i < j of min(a[i], a[j]) times (j - i)?
- How many non-empty substrings of "aabcab" are already in non-decreasing (sorted) order?
- What is the sum of the maxima of every window of size 2 in [9, 4, 7, 1, 8]?
- How many contiguous subarrays of [1, 2, 3, 4, 6, 1] have a product exactly 12?