随笔分类 -  数论-欧拉函数

摘要: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. 阅读全文
posted @ 2019-08-17 07:53 Vagari 阅读(139) 评论(0) 推荐(0) 编辑
摘要:https://www.luogu.org/problem/P2155 分析 对一个阶乘求欧拉函数,可以想到欧拉函数的一个基本公式: φ(n)=ni=1kpi1pi 因为阶乘是乘积形式的,所以我将1~m中所有phi都搞出来,给他们的倍数累 阅读全文
posted @ 2019-08-17 07:48 Vagari 阅读(162) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示