This problem is a programming version of Problem 21 from projecteuler.net
Let be defined as the sum of proper divisors of (numbers less than which divide evenly into ).
If and , where , then and are an amicable pair and each of and are called amicable numbers.
For example, the proper divisors of are therefore . The proper divisors of are so .
Evaluate the sum of all the amicable numbers under .
Input Format
The first line contains an integer , i.e., number of test cases.
Next lines will contain an integer .
Constraints
Output Format
Print the values corresponding to each test case.
Sample Input
1
300
Sample Output
504
Explanation
Under we only have and , sum is