Data Structures & AlgorithmsModerateGATE CS · ICPC regional
What is the sum of all divisors of 36 (sigma function)?
- A. 91
- B. 92
- C. 93
- D. 96
Correct answer: A. 91
The divisors of 36 are 1, 2, 3, 4, 6, 9, 12, 18 and 36, which sum to 91. The multiplicative formula (1+2+4)(1+3+9) gives the same result.
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 unordered pairs {a, b} with 1 <= a < b <= 12 have a + b divisible by 4?
- What is the product of all positive divisors of 36?
- A robot starts at (0, 0) and performs the moves L, U, R, R, D, D, L, U, U, R, R. Moves L/R change x, U/D change y. What is the Manhattan…
- How many integers x in [1, 1000] have digit sum equal to 9 and are divisible by 9?
- There are 7 people in a circle numbered 1 to 7. Starting at person 1 and counting 1, 2, 3, ..., every 3rd person is removed until one…
- How many contiguous subarrays [i..j] of [2, 5, 3, 5, 1] have a[i] equal to the maximum of that subarray (ties allowed)?