The probable reason could be you are printing ‘sebi’ instead SEBI…try to change it and submit…
IMP: While asking a doubt about a problem, its always better to provide the problem link and solution link rather than just copy-pasting the whole code here.
Solution (WA): https://www.codechef.com/viewsolution/14393074
Your code fails in the following testcase.
1 0 160 200 3 3
You are facing precision error while using floating point.
A trivial example of this is:-
0.1 + 0.2 = 30000000000000004
In the above case, correct speed = 180 whereas, your code gives speed = 179.99999999999997 and hence prints 'SEBI instead of ‘DRAW’.
This is because you are dividing one float variable with other float variable and the intermediate result cannot be stored precisely in a floating point.
If you change this
dis = D / 20.0 T = T / 3600.0 speed = dis / T + S
speed = D * 180.0 / T
then you should get an AC.
As a general rule, try to avoid intermediate floating point division as mush as possible.
You can read more about precision error in floating point in Python in the following links.