x,y = map(str,input().split())

x = int(x)

y = float(y)

if x<=y+0.50 and x%5==0:

print(y-x-0.50)

else:

print(y)

x,y = map(str,input().split())

x = int(x)

y = float(y)

if x<=y+0.50 and x%5==0:

print(y-x-0.50)

else:

print(y)

2 Likes

It worked! How did you approach it? The problem was that I put: if x<y+0.5 instead of x+0.5<y