what should i do when my coins are over in problem without reaching ans and should i abort if i get -1?

# what if coins gets over before ans In Max and electrical panel decmeber long ?

**deepu_27398**#2

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.

Test case are very weak i got 100 but still my code contains bugs which I debug latter

**harshraj22**#4

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.

**yugandhar_t**#5

If you are running out of coins or getting -1 as response then rethink your approach.