摘要:
f[n] = sum{ f[i] } ( (n-1)%i==0) f[1]=1 #include <iostream> #include <cstring> #include <cmath> #include <algorithm> using namespace std ; const int N 阅读全文
posted @ 2023-04-11 13:53
towboat
阅读(40)
评论(0)
推荐(0)
摘要:
求区间[L,R]的整数中哪一个的正约数最多。 一个数因数分解后, 它的约数Cnt = (a[j]+1) 的乘积 ,j是每个因数的个数 #include <iostream> #include <cstring> #include <cmath> #include <algorithm> using 阅读全文
posted @ 2023-04-11 12:55
towboat
阅读(38)
评论(0)
推荐(0)
摘要:
给定区间 [L,R](1≤R<(1<<30) R−L≤1e6 ),请计算区间中素数的个数。 筛出 sqrt(R) 的质数p, 遍历 L~R 的数,看能否被p 约分,也就是合数,打个标记 #include <iostream> #include <cstring> #include <cmath> # 阅读全文
posted @ 2023-04-11 12:13
towboat
阅读(88)
评论(0)
推荐(0)
浙公网安备 33010602011771号