摘要:
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, 阅读全文
摘要:
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 阅读全文