ATM : SOLUTIONS MATCHING BUT WRONG ANSWER

LINK TO MY SUBMISSION : https://www.codechef.com/problems/HS08TEST

PLEASE LET ME KNOW ! WHERE I HAVE BEEN STUCKED!

thanks in advance,
regards
thiyagarajan

1 Like

Remember 0.5 dollars charge for each transaction ???

Let’s assume you had 5 dollars in your account… And you withdraw 5 dollars from it…
Now what about 0.5 dollars charge ??? bank cannot allow negative balance :smiley:
so you need to check…

 if( X+0.5 less than Y) 

instead of

if(X less than Y) 

thanks bro @l_returns !

welcome bro :slight_smile: