https://www.lydsy.com/JudgeOnline/problem.php?id=4805
https://blog.csdn.net/popoqqq/article/details/45023331
杜教筛用来求积性函数前缀和,本题同bzoj 3944,bzoj 3944多了一个求sigma( μ ( i ) )
1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 #include<cmath> 6 #include<queue> 7 using namespace std; 8 #define LL long long 9 const int maxn=5000010; 10 LL n; 11 LL phi[maxn]={}; 12 LL pri[maxn/10]={},tot=0; 13 bool v[maxn]={}; 14 void get_phi(int m){ 15 phi[1]=1; 16 for(int i=2;i<=m;++i){ 17 if(!v[i]){pri[++tot]=i;phi[i]=i-1;}