Sum and GCD : June Long Challenge

I was unable to find error in my code.
Please help!!!
https://www.codechef.com/viewsolution/24623442

I don’t think there is any error in your code. You are getting TLE as your solution will take much more than O(n) time since it takes 0(n) time for just deleting the duplicate elements int the array, the time it takes for sorting and then the time for performing the main operation are also to be included. If you cut down the O(n) time it takes for deleting the duplicate elements by finding an alternative way to handle it, your solution will work.

Thanks, I got it :grinning: