Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- long long sum = 0;
- for (long long x = 1; x <= n; ++x) {
- long long k = n / x;
- if (n / k == x) {
- sum += x;
- }
- }
- return sum;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement