#nt904. gcd之和
gcd之和
Sum of GCDs
Problem Description
queries. Each query gives two numbers ; compute , where denotes .
Input Format
The first line contains an integer .
The next lines each contain two integers .
Output Format
A total of lines, each containing one number: the answer.
Sample Input
3
100 200
1000 2000
1000000 2000000
Sample Output
63542
9067212
17457854316166
Constraints
For all data, and are guaranteed.