Wrong answer Exchanging coins


Please see why it is failing on one test case?