結果

問題 No.1230 Hall_and_me
ユーザー Kiri8128Kiri8128
提出日時 2020-09-19 03:34:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 383 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 87,308 KB
実行使用メモリ 71,736 KB
最終ジャッジ日時 2023-09-05 02:27:35
合計ジャッジ時間 5,715 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,472 KB
testcase_01 AC 70 ms
71,396 KB
testcase_02 AC 76 ms
71,284 KB
testcase_03 AC 71 ms
71,472 KB
testcase_04 AC 72 ms
71,392 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 68 ms
71,520 KB
testcase_08 AC 72 ms
71,432 KB
testcase_09 AC 71 ms
71,300 KB
testcase_10 AC 70 ms
71,352 KB
testcase_11 AC 73 ms
71,372 KB
testcase_12 AC 71 ms
71,496 KB
testcase_13 AC 72 ms
71,352 KB
testcase_14 AC 73 ms
71,192 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 69 ms
71,572 KB
testcase_18 AC 71 ms
71,540 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 71 ms
71,300 KB
testcase_22 AC 71 ms
71,572 KB
testcase_23 WA -
testcase_24 AC 70 ms
71,664 KB
testcase_25 WA -
testcase_26 AC 70 ms
71,296 KB
testcase_27 AC 70 ms
71,236 KB
testcase_28 AC 68 ms
71,140 KB
testcase_29 AC 72 ms
71,396 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

P, Q, R = map(int, input().split())
s = P + Q + R
p, q, r = P/s, Q/s, R/s

def calc(a, b, c): # a を選んだ場合の期待値
    re = 0
    re += a * (1/2) * (1 if P >= R * 2 else 0)
    re += a * (1/2) * (1 if P >= Q * 2 else 0)
    re += b * (0 if P >= Q * 2 else 1)
    re += c * (0 if P >= R * 2 else 1)
    return re

print(max(calc(p, q, r), calc(q, r, p), calc(r, p, q)))
0