結果
| 問題 |
No.450 ベー君のシャトルラン
|
| ユーザー |
|
| 提出日時 | 2016-12-01 00:39:53 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 304 bytes |
| コンパイル時間 | 73 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 11,392 KB |
| 最終ジャッジ日時 | 2024-11-27 14:49:24 |
| 合計ジャッジ時間 | 2,145 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 2 |
ソースコード
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("{0:.20f}".format(float(ans)))