Need Help On A Number Theory Problem

Revision en2, by Jynx, 2018-09-03 20:29:45

I am trying to solve this problem
https://www.codechef.com/problems/COPRIME3 ( on codechef )

using the method specified here https://discuss.codechef.com/questions/77146/amr15b-editorial .

(Basically finding count of all triplets of numbers which have GCD > 1 )

But For some reason I am getting TLE .

https://ideone.com/zmxQ9u (My Submission )

Am I doing something wrong ? Please Help .

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Jynx 2018-09-03 20:29:45 6 Tiny change: 'ion ) \n\nI am doing som' -> 'ion ) \n\nAm I doing som'
en1 English Jynx 2018-09-03 20:26:52 451 Initial revision (published)