Sum of Divisors
InterviewTime limit1sMemory limit256 MB
Given a natural number n up to 10000, print the sum of all its positive divisors, with 1 and n included.
- Level
Easy2 of 10
- Topics
- Math, Brute force
- Solved
- No attempts yet
Problem
You are given a natural number . Find the sum of all divisors of . A divisor is a positive integer that divides with no remainder, and both 1 and count as divisors.
Input
The first line contains a natural number ().
Output
Print the sum of all divisors of on the first line.