problem link: http://lightoj.com/volume_showproblem.php?problem=1098
PDF Link: lightoj.com/volume_showproblem.php?problem=1098&language=english&type=pdf
I think this problems solution is Summation of ((floor(N/i) — 1) * i) .But n is 10^9. It will definately get TLE if I precalculate or use loop.I think there exist something that I do not know yet.Please help me solve this problem. If I need to learn any theory/algorithm to solve this problem please mention it.
Thank you very much.