x =float(input())
y = float(input())
if x % 5 == 0 and x+0.50 <= y:
y = y - 0.5 - x
print("{0:.2f}".format(y))
My code was executed without any error but after submission it’s showing run time error i also enable the custom inputs and result i’m getting is same as expected output .
Help me with this
According to the example provided in the question, both x
and y
are present in a single line with a space in between. So to handle this sort of input in python (according to the input format provided) use this → x, y = map(float, input().split())
Your style of taking input would have worked if y
was present in the next line, not in the same line.
1 Like
thank you for giving this idea i successfully executed and submitted .
As a beginner i need this kind of support once again thanks…