|
||||||||||
Problem I. CountTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 1795 Accepted Submission(s): 765 Problem Description Multiple query, for each n, you need to get n i-1 ¡Æ ¡Æ [gcd(i + j, i - j) = 1] i=1 j=1 Input On the first line, there is a positive integer T, which describe the number of queries. Next there are T lines, each line give a positive integer n, as mentioned above. T<=1e5, n<=2e7 Output Your output should include T lines, for each line, output the answer for the corre- sponding n. Sample Input
Sample Output
Source | ||||||||||
|