标签 - 欧拉函数

? 解题记录 ? ? POJ ? ? 欧拉函数 ?    2018-02-02 08:50:15    656    0    0
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
? 解题记录 ? ? BZOJ ? ? 欧拉函数 ?    2018-01-30 22:12:04    302    0    0
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
? 解题记录 ? ? 洛谷 ? ? 欧拉函数 ? ? 筛法 ?    2017-08-22 11:23:59    312    0    0
题目描述作为体育委员,C君负责这次运动会仪仗队的训练。仪仗队是由学生组成的N * N的方阵,为了保证队伍在行进中整齐划一,C君会跟在仪仗队的左后方,根据其视线所及的学生人数来判断队伍是否整齐(如下图)。 现在,C君希望你告诉他队伍整齐时能看到的学生人数。 输入输出格式输入格式:  共一个数N   输出格式:  共一个数,即C君应看到的学生人数。   输入输出样例输入样例#1:4 输出样例#1:9 说明【数据规模和约定】 对于 100% 的数据,1 ≤ N ≤ 40000 考虑对于一个矩形,站在左下角如何才能看到右上角的人?不难发现,如果有遮挡