https://ide.geeksforgeeks.org/0W1pxstLdK
https://hack.codingblocks.com/app/contests/2293/206/problem
the logic is mostly correct.but I think there is some syntax problem so it is showing runtime error.how to correct?
Simple input-python contest
hey @anikaitgupta3 ,
Sorry for the delay in responding to your doubt.
On type casting the input into integer, you are not saving/updating your variable , hence it remains as a string , and when you check it as < 0 , then you are actually comparing a string and an integer and hence get that error.
I hope this helps.