結果
問題 | No.450 ベー君のシャトルラン |
ユーザー |
![]() |
提出日時 | 2024-01-30 21:16:34 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 340 bytes |
コンパイル時間 | 344 ms |
コンパイル使用メモリ | 82,020 KB |
実行使用メモリ | 82,092 KB |
最終ジャッジ日時 | 2024-09-28 10:17:48 |
合計ジャッジ時間 | 4,936 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 TLE * 1 -- * 1 |
ソースコード
vl,vr = map(int,input().split()) d = int(input()) w = int(input()) vl *= 1000000000 vr *= 1000000000 w *= 1000000000 r = 0 l = d p = 0 ans = 0 while r < l: time = d / (vr + w) l2 = vl * time r2 = w * time ans += r2 if r2/ans < 10**(-9): break d = r2 - l2 r = l2 l = r2 vl,vr = vr,vl print(ans)