You are given a positive integer n. Your task is to return the sum of all its positive divisors, including 1 and n itself.
Input: n = 6
Output: 12
Explanation: The positive divisors of 6 are 1, 2, 3, and 6. Their sum is 1 + 2 + 3 + 6 = 12.
Input: n = 7
Output: 8
Explanation: Since 7 is prime, its positive divisors are 1 and 7. Their sum is 1 + 7 = 8.
Input: n = 1
Output: 1
Explanation: The number 1 has only one positive divisor, 1. Therefore, the sum is 1.
Sign in to write, run, and submit your solution against the full test suite.