Please can anyone find error in my code for which subtask1 test cases are given as Wrong Answer(I understand TLE for Subtask2)
What i have simply done is for each element in array A for i, copied n-1 elements to array B except index i element of A. And simply calculated sum array B GCD and that element. And finding the max value of it. Cannot find where is the problem.