ADDLCM problem — SPOJ

Revision en1, by Death_Scythe, 2016-05-09 06:48:15

Hello all! :)

I stumbled upon this problem but I do not know how to solve it.

http://www.spoj.com/problems/ADDLCM/

The sum can be written as

but this doesn't make the problem any easier. I can evaluate the first sum but its not easy to evaluate the second. Please give me some ideas to solve this.

Any help is appreciated. Thanks!

Tags lcm, spoj, math, number theory

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Death_Scythe 2016-05-09 06:48:15 454 Initial revision (published)