摘要: /* 题意: 对于每个数字a[i]找到一个数num[i],num[i]的欧拉函数值大于等于a[i], 求找到的所有数的最小和。 */ #include #include #include #include #include #include using namespace std; typedef long long LL; const int N = 1e6 + 10; int a... 阅读全文
posted @ 2017-04-24 21:03 byonlym 阅读(195) 评论(0) 推荐(0)
摘要: G=0; for(i=1;i<N;i++) for(j=i+1;j<=N;j++) { G+=gcd(i,j); } SampleInput 10 100 200000 0 SampleOutput 67 13015 143295493160 阅读全文
posted @ 2017-04-24 20:53 byonlym 阅读(141) 评论(0) 推荐(0)
摘要: /* 求1到2^64-1之间的数,这个数至少有两个不同数的正整数的幂,按从小到大的顺序输出! 要是两个不同正整数的幂,则它必定是一个正整数的合数幂(这样才可以继续分解出另外一个数的幂形式) */ #include #include #include #include #include #include #include using namespace std; typedef lo... 阅读全文
posted @ 2017-04-24 20:46 byonlym 阅读(108) 评论(0) 推荐(0)