what should i do when my coins are over in problem without reaching ans and should i abort if i get 1? asked 10 Dec '18, 15:17

you have 1000 coins in the beginning and u have to find the answer in these 1000 coins only !!! u wont get more than 1000 coins in any test case. We can solve all the test cases with the given constraints . if u need more than 1000 coins to solve then simply change the way you are thinking , change your approach for this problem. answered 10 Dec '18, 15:29

Test case are very weak i got 100 but still my code contains bugs which I debug latter :p answered 10 Dec '18, 19:23

Think more mathematically >>>>> have a closer look at the ways you spend your coins , once you find where to save the coins , the problem is more simpler than it seems ....... Best Wishes. answered 11 Dec '18, 21:43

If you are running out of coins or getting 1 as response then rethink your approach. answered 12 Dec '18, 23:36

isn't it simple binary search? , i am getting few wrong answer by this approach answered 14 Dec '18, 17:40
