2226 - [Spoj 5971] LCMSum

Given n, calculate the sum LCM(1,n) + LCM(2,n) + .. + LCM(n,n), where LCM(i,n) denotes the Least Common Multiple of the integers i and n.

输入

The first line contains T the number of test cases. Each of the next T lines contain an integer n.

输出

Output T lines, one for each test case, containing the required sum.

样例

输入

3
1
2
5

输出

1
4
55

提示

Constraints

1 <= T <= 300000 1 <= n <= 1000000

时间限制 1 秒
内存限制 128 MB
统计
上一题 下一题