結果

問題 No.450 ベー君のシャトルラン
コンテスト
ユーザー pekempey
提出日時 2016-12-01 00:36:44
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 285 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,818 ms
コンパイル使用メモリ 81,280 KB
実行使用メモリ 86,440 KB
最終ジャッジ日時 2026-09-30 22:14:20
合計ジャッジ時間 4,580 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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