Gcd and Lcm

Time Limit: 3000ms
Memory Limit: 524288KB
This problem will be judged on HDU. Original ID: 5341
64-bit integer IO format: %I64d      Java class name: Main

Description

$\sum_{i=1}^n\sum_{j=1}^n\sum_{k=1}^n\sum_{l=1}^n [(i,j),(k,l)]$

Input

First line contains a single integer $T \leq 100$ which denotes the number of test cases.

For each test case, there is an positive integer $n \leq 10^{7}$.

Output

For each case, output an integer in a single line means the answer mod $2^{32}$.

Sample Input

1
1

Sample Output

1

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .