F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Gcd and Lcm

Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)
Total Submission(s): 190    Accepted Submission(s): 73


Problem 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
 

Hint
[a,b] means lowest common multiple of a and b,(a,b) means greatest common divisor of a and b.
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-21 21:25:14, Gzip enabled