{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\n\tHere GCD(i,j) means the greatest common divisor of integer i and integer j.\u003c/p\u003e\n\u003cp\u003e\n\tFor those who have trouble understanding summation notation, the meaning of G is given in the following code:\u003c/p\u003e\n输入N,求下面代码执行之后,G的值。\n\u003ctable align\u003d\"center\" border\u003d\"1\" cellpadding\u003d\"0\" cellspacing\u003d\"0\"\u003e\n\t\u003ctbody\u003e\n\t\t\u003ctr\u003e\n\t\t\t\u003ctd style\u003d\"width:390px;\"\u003e\n\t\t\t\t\u003cp\u003e\n\t\t\t\t\tG\u003d0;\u003c/p\u003e\n\t\t\t\t\u003cp\u003e\n\t\t\t\t\tfor(i\u003d1;i\u0026lt;N;i++)\u003c/p\u003e\n\t\t\t\t\u003cp\u003e\n\t\t\t\t\tfor(j\u003di+1;j\u0026lt;\u003dN;j++)\u003c/p\u003e\n\t\t\t\t\u003cp\u003e\n\t\t\t\t\t{\u003c/p\u003e\n\t\t\t\t\u003cp\u003e\n\t\t\t\t\t\u0026nbsp;\u0026nbsp;\u0026nbsp; G+\u003dgcd(i,j);\u003c/p\u003e\n\t\t\t\t\u003cp\u003e\n\t\t\t\t\t}\u003c/p\u003e\n\t\t\t\t\u003cp\u003e\n\t\t\t\t\t/*Here gcd() is a function that finds the greatest common divisor of the two input numbers*/\u003c/p\u003e\n\t\t\t\u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\n\tThe input file contains at most 100 lines of inputs. Each line contains an integer N (1\u0026lt;N\u0026lt;4000001). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero.\u003c/p\u003e\n有多组数据,以0结尾。\u003cbr\u003e\n每行一个整数N\n"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\n\tFor each line of input produce one line of output. This line contains the value of G for the corresponding N. The value of G will fit in a 64-bit signed integer.\u003c/p\u003e\n\u003cbr\u003e对于每个N,输出相应的结果G。\u003cbr\u003e\n提示:可以枚举gcd的值,再通过欧拉函数解决。"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cp\u003e\n\t10\u003cbr /\u003e\n\t100\u003cbr /\u003e\n\t200000\u003cbr /\u003e\n\t0\u003c/p\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cp\u003e\n\t67\u003cbr /\u003e\n\t13015\u003cbr /\u003e\n\t143295493160\u003c/p\u003e"}}]}