結果

問題 No.450 ベー君のシャトルラン
ユーザー pekempey
提出日時 2016-12-01 00:36:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 285 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 88,704 KB
最終ジャッジ日時 2024-11-27 14:53:09
合計ジャッジ時間 5,279 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

from fractions import Fraction

vl, vr = map(int, input().split())
d = int(input())
w = int(input())

D = d
ans = Fraction(0)
for _ in range(100):
	t = Fraction(D, w + vr)
	dd = t * (w - vl)
	tt = Fraction(dd, w + vl)
	D -= (t + tt) * (vr + vl)
	ans += (t + tt) * w

print(float(ans))
0