The following is my code for the problem,it worls fine for all sample inputs but after submitting gives wrong answer:-
w,a=input().split()
w,a=float(w),float(a)
if w>a:
print("{0:.2f}".format(a))
elif w%5!=0:
print("{0:.2f}".format(a))
else:
a=a-w-0.50
print("{0:.2f}".format(a))