ofcRS

Untitled

Nov 7th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. v1, v2, v3, s = map(int, input().split())
  2. s1 = v1*300
  3. s2 = v2*600
  4. s3 = s - (s1 + s2)
  5. if s <= s1:
  6.     print("{0:.6f}".format(s/v1))
  7. elif s <= (s1+s2):
  8.     print("{0:.6f}".format(s1/v1+(s-s1)/v2))
  9. else:
  10.     print("{0:.6f}".format(s1/v1+s2/v2+(s-s1-s2)/v3))
Advertisement
Add Comment
Please, Sign In to add comment