How to solve gcdex2 from SPOJ?

Revision en2, by PanicStation, 2017-12-16 01:25:24

How to solve GCDEX2 from spoj ? I have already solved this problem GCDEX with help of this blog "A-Dance-with-Mobius-Function". but I don't think i can use the same technique on the above problem because the N is too big.

Tags mobius inversion formula, gcd, eular phi

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English PanicStation 2017-12-16 01:25:24 81
en1 English PanicStation 2017-12-16 01:22:10 378 Initial revision (published)