LCM Sum
Medium
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
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.
Input
First line contains the number of test cases t (1 ≤ t ≤ 300000). Each of the next t lines contains an integer n (1 ≤ n ≤ 10^6
).
Output
Print t lines, one for each test case, containing the required sum.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 21%