摘要: 题意:欧拉函数前n项和.思路:欧拉函数欧拉函数:φ函数的值 通式:φ(x)=x(1-1/p1)(1-1/p2)(1-1/p3)(1-1/p4)…..(1-1/pn) ,其中p1, p2……pn为x的所有质因数 1 #include <iostream> 2 using namespace std; 3 const int N = 1e6+5; 4 long long phi[N]; 5 6 void Init() 7 { 8 int i, j; 9 for (i=1; i<N; i++)10 phi[i] = i;11 for (i=2; i<N; i... 阅读全文
posted @ 2013-06-15 15:59 旅行的蜗牛 阅读(190) 评论(0) 推荐(0) 编辑