Looks like you are completley new to competitive programming.
Rule of Thumb never add statments like “Enter the amount” and such.
Please refer to the How to get started page or look at the existing submissions by clicking on
All Submissions button.
PS. I am not commenting on your logic , since your whole program is wrong, because of those interactive statements.
But I don’t think logic is wrong.
Thanks again for letting me know any interactive statement.
Take input according to the question. First withdraw amt. and then initial balance.
Logic is correct but you have to print according to the question for successful submission. Hopefully you can figure it out.
Yes I understood and have submitted and got accepted. Thank you