runtime error

program compiled and ran successfully on my laptop,codechef shows runtime error.

@mandalamk :
According to me it means that your program may not be running as required.
It can occur due to:
main not returning a 0
or, memory being exceeded.
or it can be due to a infinite loop etc.

it ran properly in your compiler due to the given test cases but may fail the corner test cases…
Please do check all the corner test cases carefully


hey @mandalamk,this is your solution link i guess link.Remove void and write int in place of it…and just before last braces of your program add return zero statement and another thing is that remove “insufficient balance \n balance is = %f"” statement…you need not to write anything other than asked

happy coding and let me know if anything goes wrong

@emin3m it isn’t working still.i have uploaded the solution with the corrections you suggested.

would you please explain me the corner test cases you are talking about?