DescriptionGiven n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z > 0 such that a = xy and b = xz. InputThere are several test cases. For each test case, standard input
Description
Given n, calculate the sum LCM(1,n) + LCM(2,n) + .. + LCM(n,n), where LCM(i,n) denotes the Least Common Multiple of the integers i and n.
Input
The first line contains T the number of test cases. Each of the next T lines contain an integer n.
Output
Output T lines, one for each te
题目描述作为体育委员,C君负责这次运动会仪仗队的训练。仪仗队是由学生组成的N * N的方阵,为了保证队伍在行进中整齐划一,C君会跟在仪仗队的左后方,根据其视线所及的学生人数来判断队伍是否整齐(如下图)。 现在,C君希望你告诉他队伍整齐时能看到的学生人数。 输入输出格式输入格式: 共一个数N 输出格式: 共一个数,即C君应看到的学生人数。 输入输出样例输入样例#1:4 输出样例#1:9 说明【数据规模和约定】 对于 100% 的数据,1 ≤ N ≤ 40000 考虑对于一个矩形,站在左下角如何才能看到右上角的人?不难发现,如果有遮挡