Help needed on a number theory problem.

Revision en2, by i_am_eating_wa_and_tle, 2017-10-31 23:28:44

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.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English i_am_eating_wa_and_tle 2017-11-01 14:48:40 100
en3 English i_am_eating_wa_and_tle 2017-11-01 14:41:47 2 Tiny change: 'I think [This](light' -> 'I think [this](light'
en2 English i_am_eating_wa_and_tle 2017-10-31 23:28:44 14 Tiny change: 'mation of floor(N/i) * i**_ .But n' -> 'mation of ((floor(N/i) - 1) * i)**_ .But n'
en1 English i_am_eating_wa_and_tle 2017-10-30 23:01:15 451 Initial revision (published)