\[\sum\limits_{i=1}^N\sum\limits_{j=1}^M\frac{ij}{\gcd(i,j)} \]\[\sum\limits_{d=1}^N\frac 1 d\sum\limits_{i=1}^N\sum\limits_{j=1}^Mij[\gcd(i,j)=d] \]\[\sum\limits_{d=1}^N d\sum\limits_{i=1}^{\lfloor\frac N d\rfloor}\sum\limits_{j=1}^{\lfloor\frac M d\rfloor}ij[\gcd(i,j)=1] \]\[\sum\limits_{d=1}^N d\sum\limits_{i=1}^{\lfloor\frac N d\rfloor}\sum\limits_{j=1}^{\lfloor\frac M d\rfloor}ij\sum\limits_{x|\gcd(i,j)}\mu(x) \]\[\sum\limits_{d=1}^N d\sum\limits_{i=1}^{\lfloor\frac N d\rfloor}\mu(i)\sum\limits_{i|x}^{\lfloor\frac N d\rfloor}i\sum\limits_{j|x}^{\lfloor\frac M d\rfloor}j \]\[\frac 1 4\sum\limits_{i=1}^N i\sum\limits_{d=1}^{\lfloor\frac N i\rfloor}\mu(d)d^2\lfloor\frac N {id}\rfloor(\lfloor\frac N {id}\rfloor+1)\lfloor\frac M {id}\rfloor(\lfloor\frac M {id}\rfloor+1) \]\[\frac 1 4\sum\limits_{T=1}^N\lfloor\frac N T\rfloor(\lfloor\frac N T\rfloor+1)\lfloor\frac M T\rfloor(\lfloor\frac M T\rfloor+1) T\sum\limits_{d|T}\mu(d)d \] 标签:lfloor,frac,limits,JZPTAB,sum,rfloor,mu,P1829,Crash From: https://www.cnblogs.com/mRXxy0o0/p/17973612