https://atcoder.jp/contests/agc038/tasks/agc038_c 题意:给\(a_i\),求\(\sum_{i=1}^n\sum_{j=i+1}^nlcm(a_i,a_j)\) 题解:设\(\sum_{d|i}c_d=\frac{1}{i}\),\(O(nlogn)\)求出\(c_i\) \(\sum_{i=1}^n\sum_{j=i+1}^nlcm(a_i,a_j)\) \(=\sum_{i=1}^n\sum_{j=i+1}^n\frac{a_i\cdot a…