Advertisement
aa11111111111

Untitled

Oct 15th, 2024
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. long long sum = 0;
  2.  
  3. for (long long x = 1; x <= n; ++x) {
  4. long long k = n / x;
  5. if (n / k == x) {
  6. sum += x;
  7. }
  8. }
  9.  
  10. return sum;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement