
|--欧拉函数
SimonCoder
No matter how gift , you along can not change the world
展开
-
hdoj 3501 Calculation 2(欧拉函数)
http://acm.hdu.edu.cn/showproblem.php?pid=3501 #include#include#define NUM 1000000007__int64 Euler(__int64 n){__int64 ret=n,i;for(i=2;i*i1) ret=ret-ret/n;return ret;}int main(){__int64 N,sum_原创 2014-11-22 08:07:28 · 687 阅读 · 0 评论 -
hdoj 1787 GCD Again(欧拉函数)
http://acm.hdu.edu.cn/showproblem.php?pid=1787原创 2014-11-21 23:33:33 · 620 阅读 · 0 评论 -
hdoj 2588 GCD(欧拉函数)
http://acm.hdu.edu.cn/showproblem.php?pid=2588 GCD Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1111 Accepted Submission(s): 507原创 2014-11-22 16:42:32 · 646 阅读 · 0 评论 -
欧拉函数
http://pan.baidu.com/s/1ntOaEId 欧拉函数 主讲人 厉伟键 欧拉函数 对正整数n,欧拉函数是少于或等于n的数中与n互质的数的数目。此函数以其首名研究者欧拉命名,它又称为φ函数、欧拉商数等。 例如φ(8)=4,因为1,3,5,7均和8互质。 φ函数 通式:φ(x)=x(1-1/p1)(1-1/p2)(1-1/p3)(1-1/p4)…..(1-1/原创 2014-11-21 23:41:10 · 471 阅读 · 0 评论 -
hdoj 2824 The Euler function(欧拉函数打表)
http://acm.hdu.edu.cn/showproblem.php?pid=2824原创 2014-11-22 16:55:00 · 899 阅读 · 0 评论 -
nyoj 题目570 欧拉函数求和
http://acm.nyist.net/JudgeOnline/problem.php?pid=570 #include int Euler(int n) { int ret=n,i; for(i=2;i*i<=n;i++) { if(n%i==0) { ret=ret-ret/i; while(n%i==0) n/=i;原创 2014-11-23 17:55:29 · 684 阅读 · 0 评论 -
hdoj 1286 找新朋友(欧拉函数)
http://acm.hdu.edu.cn/showproblem.php?pid=1286 #include #include int a[33000]; int main() { int T,N,i,j,k,n,m; scanf("%d",&T); while(T--) { int sum=0;原创 2014-11-21 23:59:19 · 706 阅读 · 0 评论