Sum of Divisors
By Kay Akashi
Time: 1000 ms
Memory: 256000 kB
The code judging system is only available during contests. Check out the
github repo for test cases and solutions.
Problem Statement
Given an integer n, output the sum of divisors of n.
In the first example, divisors of 20 are (1,2,4,5,10,20) hence the answer is 1+2+4+5+10+20=42.
In the second example, divisors of 2022 are (1,2,3,6,337,674,1011,2022) hence the answer is 1+2+3+6+337+674+1011+2022=4056.
Constraints
0<n≤1010.
Subtask 1 (30%)
0<n<100.
Subtask 2 (30%)
100≤n<105.
Subtask 3 (40%)
105≤n≤1010.
Input
Input consists of a single integer, n.
Output
Output the answer.
Examples