GCDPRDSM - GCD Product Sum


In this problem, you will be given q queries (1 ≤ q ≤ 1 000 000). Each query will contain a single integer n (1 ≤ n ≤ 1 000 000).

For each query you have to output the following:

equation

Input

First line will contain the number of queries q. Next q lines will contain a single integer n.

Output

Output the answer for each query in a new line.

Example

Input:
4
4
6
7
9 Output: 24
63
70
135

Explanation:

For second query (n=6):

1*gcd(1,6)+2*gcd(2,6)+3*gcd(3,6)+4*gcd(4,6)+5*gcd(5,6)+6*gcd(6,6)

1*1+2*2+3*3+4*2+5*1+6*6

1+4+9+8+5+36=63


hide comments
fuadul_hasan: 2022-10-14 06:12:40

can you please tell me the reason of runtime error. link: <snip>
[Simes]: use the forum for this.

Last edit: 2022-10-14 08:12:38

Added by:sankalp_7
Date:2022-10-13
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:Own