Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- v1, v2, v3, s = map(int, input().split())
- s1 = v1*300
- s2 = v2*600
- s3 = s - (s1 + s2)
- if s <= s1:
- print("{0:.6f}".format(s/v1))
- elif s <= (s1+s2):
- print("{0:.6f}".format(s1/v1+(s-s1)/v2))
- else:
- print("{0:.6f}".format(s1/v1+s2/v2+(s-s1-s2)/v3))
Advertisement
Add Comment
Please, Sign In to add comment