题目描述
Background
Given a natural number n, find the summation of all its proper divisors.
Definition: A proper divisor of a natural number is the divisor that is strictly less than the number. e.g. number 20 has 5 proper divisors: 1, 2, 4, 5, 10, and the divisor summation is: 1 + 2 + 4 + 5 + 10 = 22.
Input:
An integer stating the number of test cases T and that many lines follow, each containing natural number n for which output will be summation of all its proper divisors.
Output:
One integer each line: the divisor summation of the integer given respectively.
Constraints
1<=T <=200000
1 <= n <= 500000
Sample Input
3
2
10
20
Sample Output
1
8
22
输入格式
见题面
输出格式
见题面
样例输入
3
2
10
20
样例输出
1
8
22