CSES - Sum of Divisors

Author: Benjamin Qi

Table of Contents


Edit on Github

Our goal is to compute the summation i=1nnii\sum_{i=1}^n\left\lfloor \frac{n}{i}\right\rfloor\cdot i in faster than Θ(n)\Theta(n) time.

Hint

Solution

Give Us Feedback on CSES - Sum of Divisors!