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

摘要:"传送门" 题意: 给两个整数a,m $( 1 \le a include include include include include include include include using namespace std; typedef long long ll; const int max 阅读全文
posted @ 2020-02-01 23:10 _Alexander 阅读(247) 评论(0) 推荐(0)
摘要:题意: 给你一个区间[L,R],求L到R的所有数的因子的k次幂之和 思路: 对于(1—r)每个数,求它的因子和。如何求呢?我们可以枚举(i=1-r),以i作为因子的iki^k,然后对于每个有以i为因子的数都加上它,对于每个数的因子次幂和放到a[i]数组里。例如以2为因子的有2,4,6,8,10…,然 阅读全文
posted @ 2019-12-04 14:43 _Alexander 阅读(325) 评论(0) 推荐(0)
摘要:原题链接 Problem Description The Euler function phi is an important kind of function in number theory, (n) represents the amount of the numbers which are 阅读全文
posted @ 2019-11-06 19:35 _Alexander 阅读(137) 评论(0) 推荐(0)
摘要:原题链接 http://acm.hdu.edu.cn/showproblem.php?pid=3501 Given a positive integer N, your task is to calculate the sum of the positive integers less than N 阅读全文
posted @ 2019-11-06 12:27 _Alexander 阅读(226) 评论(0) 推荐(0)