摘要:
求∑1<=i<=n∑1<=j<=ngcd(i,j) % P P = 10^9 + 7 2 <= n <= 10^10 这道题,明显就是杜教筛 推一下公式: 利用∑d|nphi(d) = n ans = ∑1<=i<=n∑1<=j<=n∑d|(i,j)phi(d) = ∑1<=d<=n∑1<=i<=n 阅读全文
摘要:
题意: f(n) = sigma(gcd(i,n)) 1 <= i <= n g(n) = sigma(f(d)) d | n n = x1 * x2 * ... * xm 其中 x[i+1] = (a * x[i] + b) % c + 1 1 <= m <= 10^18 1 <= c <= 10 阅读全文