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 )
I am doing something wrong ? Please Help .