摘要:
http://blog.csdn.net/xuzengqiang/article/details/7476671http://blog.csdn.net/shiren_bod/article/details/5664934 阅读全文
摘要:
DescriptionIn the Fibonacci integer sequence, F_0 = 0, F_1 = 1, and F_n = F_{n-1} + F_{n-2} for n \geq 2. For example, the first ten terms of the Fibo... 阅读全文
摘要:
1 long long euler_phi(int n) 2 { 3 int m=(int)sqrt(n+0.5); 4 int ans=n; 5 for(int i=2;i1)ans=ans/n*(n-1);14 return ans;15 }Descriptio... 阅读全文
摘要:
1 scanf("%s%d",a,&b);2 int len=strlen(a);3 int ans=0;4 for(int i=st;i 0, b fits into a 32 bit signed integer). Numbers will not contain leading zeroes... 阅读全文
摘要:
1 long long x,y,gcd; 2 void extend_gcd(long long a, long long b) 3 { 4 if(b == 0) 5 { 6 x = 1; 7 y = 0; 8 gcd = a; 9... 阅读全文
摘要:
线性筛更快。1.埃氏筛法1 int m=sqrt(n+0.5);2 memset(vis,0,sizeof(vis));3 for(int i=2;i 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 in... 阅读全文
摘要:
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4565这个博客讲的比较好:http://blog.csdn.net/ljd4305/article/details/8987823题意:给定a,b,,n,m,求Sn 1 #include 2 #incl... 阅读全文