P1403 [AHOI2005]约数研究
数学推导
\[\sum\limits^{n}_{i=1}f(i) =\sum\limits^{n}_{i=1}\sum\limits_{d\mid i}1\\ =\sum\limits^{n}_{i=1}\sum\limits^{i}_{d=1}[d\mid i]\\ =\sum\limits^{i}_{d=1}\sum\limits^{n}_{i=1}[d\mid i]\\ =\sum\limits^{n}_{i=1}\lfloor\frac{n}{i}\rfloor
\]