Bedtime Reading I
Time limit2sMemory limit512 MB
Given an integer I, compute the sum of all its divisors.
- Level
Easy2 of 10
- Topics
- Math, Number theory, Brute force
- Solved
- No attempts yet
Problem
The sigma function of a number is the sum of that number's divisors. For example, the divisors of 12 are 1, 2, 3, 4, 6, and 12, so the sigma function of 12 is 28.
Given an integer , compute the sigma function of .
Input
The first line contains an integer ().
Output
Print the sum of all divisors of on the first line.