摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=2820 首先按照套路 ans =ΣprimeΣ(i=1,n)Σ(j=1,m)[gcd(i,j)=prime] =ΣprimeΣ(i=1,[n/prime])Σ(j=1,[m/prime])[gcd(i, 阅读全文
posted @ 2017-12-13 22:10 Stump 阅读(213) 评论(0) 推荐(0) 编辑
摘要: BZOJ1101 http://www.lydsy.com/JudgeOnline/problem.php?id=1101 求gcd(a,b)=k a,b中必然包含k的因子 问题等价于a'=a/k,b'=b/k,求有多少对(i,j),其gcd(i,j)=1,1<=i<=a',1<=j<=b' ans 阅读全文
posted @ 2017-12-13 15:44 Stump 阅读(215) 评论(0) 推荐(0) 编辑