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

UVa 11426
摘要:首先我们了解一下欧拉函数phi[x],phi[x]表示的是不超过x且和x互素的整数个数 phi[x]=n*(1-1/p1)*(1-1/p2)....(1-1/pn); 计算欧拉函数的代码为 1 int euler_phi(int n){ 2 int m=(int)sqrt(n+0.5); 3 int 阅读全文

posted @ 2017-01-14 21:08 见字如面 阅读(179) 评论(0) 推荐(0)

导航