[RECIPE]HELP: Getting wrong answer in Cutting Recipes

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 :slight_smile:


Instead of finding the minimum ,try and find the gcd of all the numbers in the array.