結果

問題 No.450 ベー君のシャトルラン
ユーザー nebukuro09nebukuro09
提出日時 2016-12-01 21:53:26
言語 PyPy2
(7.3.15)
結果
TLE  
実行時間 -
コード長 338 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 76,672 KB
実行使用メモリ 82,560 KB
最終ジャッジ日時 2024-05-05 16:57:17
合計ジャッジ時間 6,614 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
80,512 KB
testcase_01 AC 79 ms
75,264 KB
testcase_02 AC 79 ms
75,520 KB
testcase_03 AC 80 ms
75,392 KB
testcase_04 AC 79 ms
75,520 KB
testcase_05 AC 77 ms
75,264 KB
testcase_06 AC 80 ms
75,136 KB
testcase_07 AC 79 ms
75,008 KB
testcase_08 AC 82 ms
75,264 KB
testcase_09 AC 82 ms
75,520 KB
testcase_10 AC 82 ms
75,392 KB
testcase_11 AC 78 ms
75,264 KB
testcase_12 AC 80 ms
75,520 KB
testcase_13 AC 80 ms
75,264 KB
testcase_14 AC 81 ms
75,008 KB
testcase_15 AC 79 ms
75,008 KB
testcase_16 AC 78 ms
75,264 KB
testcase_17 AC 75 ms
75,264 KB
testcase_18 AC 77 ms
75,264 KB
testcase_19 AC 78 ms
75,392 KB
testcase_20 AC 79 ms
75,264 KB
testcase_21 TLE -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

vl, vr = map(float, raw_input().split())
d1 = float(raw_input())
w = float(raw_input())

EPS = 0.0000001
a = 0
while True:
    t1 = d1/(vr+w)
    a1 = w * t1
    if a1 < EPS:
        break
    a += a1
    d2 = d1-(vl+vr) * t1
    t2 = d2 / (vl+w)
    a2 = w * t2
    if a2 < EPS:
        break
    a += a2
    d1 = d2-(vl+vr)*t2

print a
0