Sum of GCD and LCM

The greatest common divisor (GCD) of two integers, is the largest integer that divides both of the i…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

Please update constraints format,

T (1 ≤ T ≤ 105) should be => T (1 ≤ T ≤ 10^5)
N (1 ≤ N ≤ 108) should be => N (1 ≤ N ≤ 10^8)