VMSS Pre-Pre-Windsor P1 - Mr. White's Carnival

View as PDF

Submit solution


Points: 3
Time limit: 2.0s
Memory limit: 64M

Authors:
Problem type

Navidur went to the carnival and played the stereotypical hit something with a big hammer as hard as you can. When he hit the platform, the puck flew up exactly N meters. Now, the carnival is actually hosted by Mr. White, so the scoring is a little strange this time around. Navidur's score is the sum of all the positive factors of N. What's his score?

Input Specification

The input will be a single integer N (1 \le N \le 10^6).

Output Specification

Output the sum of the positive factors of N.

Sample Input

27

Sample Output

40

Comments


  • 0
    gavin_chen  commented on March 5, 2022, 1:29 a.m.

    The number its self is a factor (I made that mistake)