結果

問題 No.450 ベー君のシャトルラン
ユーザー ntuda
提出日時 2024-01-30 21:09:56
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 300 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 81,984 KB
実行使用メモリ 81,832 KB
最終ジャッジ日時 2024-09-28 10:17:17
合計ジャッジ時間 4,791 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 TLE * 1 -- * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

vl,vr = map(int,input().split())
d = int(input())
w = int(input())
r = 0
l = d
p = 0
ans = 0
while r < l:
    time = d / (vr + w)
    l2 = vl * time
    r2 = w * time
    if r2 > 0.0000001:
        ans += r2
    else:
        break
    d = r2 - l2
    r = l2
    l = r2
    vl,vr = vr,vl

print(ans)
0