Big GCD : Why test case 4 is giving runtime error?

code : https:// ide.codingblocks.com/#/s/13416
problem : https:// hack.codingblocks.com/contests/c/452/702

other test cases pass

Your code is not working when a becomes 0. So try to fix this first. because modu function will not work when a =0 . Btw if you need code then i have modified ur code here http://ide.codingblocks.com/#/s/13466

1 Like