Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- green_light, red_light = list(map(int, input().split()))
- s, v, a = list(map(int, input().split()))
- period = green_light + red_light
- t = s / v
- if t % period - green_light < 0:
- print('Pass')
- else:
- stop = v ** 2 / (2 * a)
- stop_time = (s - stop) / v + v / a
- stop_time = stop + (period - stop % period)
- print(f"{stop:.3f} {stop_time:.3f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement