SHARE
TWEET

Untitled

a guest Jan 28th, 2020 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. green_light, red_light = list(map(int, input().split()))
  2. s, v, a = list(map(int, input().split()))
  3. period = green_light + red_light
  4. t = s / v
  5. if t % period - green_light < 0:
  6.     print('Pass')
  7. else:
  8.     stop = v ** 2 / (2 * a)
  9.     stop_time = (s - stop) / v + v / a
  10.     stop_time = stop + (period - stop % period)
  11.     print(f"{stop:.3f} {stop_time:.3f}")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top