随笔分类 - 数论-欧拉函数
摘要: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.
阅读全文
摘要:https://www.luogu.org/problem/P2155 分析 对一个阶乘求欧拉函数,可以想到欧拉函数的一个基本公式: $\varphi (n)=n\prod_{i=1}^k \frac{p_i-1}{p_i}$ 因为阶乘是乘积形式的,所以我将1~m中所有phi都搞出来,给他们的倍数累
阅读全文

浙公网安备 33010602011771号