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.