Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t = int(input())
- for i in range(t):
- x = int(input())
- ans = 0
- ans1 = 0
- for i in range(1, x + 1):
- if (x % i == 0):
- if (i % 2 == 0):
- ans += i
- else:
- ans1 += i
- print(abs(ans - ans1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement