Solution worked for given test cases but not working on codechef.
Here is a link for my solution. CodeChef: Practical coding for everyone
Try test cases like… 4 6 8
4 Likes
Instead of finding the minimum ,try and find the gcd of all the numbers in the array.