I tried to solve the Practice problem HS08TEST using python 3.6 . This python code shows a Runtime Error : NZEC Please help me with this code .
try:
x,y=map(float,input().split())
x1=x+0.5
if(x1<y and x%5==0):
y-=x1
print("",y)
except:
pass
Have you clicked on “Run”?
Assuming you have done, provide some valid input under the section “Custom Input”.
Assuming you have not, click on the “Submit” button and the code should run fine. If it is still not running please send a link to your solution.
Hope it helps
3 Likes
There should not be runtime error. But it will give you wrong answer.
1 Like
I have done every thing you mentioned but it is not working
here is the link to my solution
https://www.codechef.com/viewsolution/47306430
Thanks for replying !
Could you suggest me …what to do in order to get the right answer?
change the following line
to
if x1 <= y and x % 5 == 0:
1 Like
It worked ! Thank you very much for the help .