Nzec error for my code -atm

For the atm question I tried using python 3
The code is

w,b=tuple(input().split(" "))
w=int(w)
b=float(b)
if w%5==0 and (w+0.5)<=b :
print(b-w-0.5)
else:
print(b)

And when I submit it throws me a runtime error
Can someone help me figure out whats wrong with my code

Because of the 1st line. You are taking input in int and then changing in float. Do this->
w,b = [float(x) for x in input().split()]
w=int(w)
b=float(b)
if w%5==0 and (w+0.5)<=b:
print(b-w-0.5)
else:
print(b)