Solution worked for given test cases but not working on codechef.
Here is a link for my solution. http://www.codechef.com/viewsolution/5454782
Try test cases like… 4 6 8
2 Likes
Instead of finding the minimum ,try and find the gcd of all the numbers in the array.