摘要: 传送门:http://www.lydsy.com:808/JudgeOnline/problem.php?id=1101 思路:设a#include#includeusing namespace std;const int maxn=50010;int mu[maxn],A,B,d,pri[ma... 阅读全文
posted @ 2015-10-12 17:04 orzpps 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://www.spoj.com/problems/GCDEX/ 思路:令g(n)=ΣΣgcd(i,j)(i#include#include#includeconst int N=1000000;using namespace std;typedef long long ll;ll... 阅读全文
posted @ 2015-10-12 11:24 orzpps 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://www.lydsy.com:808/JudgeOnline/problem.php?id=2705 思路:首先要求的是Σgcd(i,n)(1#include#includeusing namespace std;typedef long long ll;ll n,ans;l... 阅读全文
posted @ 2015-10-12 09:17 orzpps 阅读(175) 评论(0) 推荐(0) 编辑