結果
問題 | No.1230 Hall_and_me |
ユーザー |
![]() |
提出日時 | 2020-09-19 03:41:38 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 29 ms / 2,000 ms |
コード長 | 358 bytes |
コンパイル時間 | 87 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-06-22 23:26:43 |
合計ジャッジ時間 | 1,982 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 36 |
ソースコード
p, q, r = map(int, input().split())def calc(a, b, c): # a を選んだ場合の期待値re = 0re += a * (1/2) * (1 if a >= c * 2 else 0)re += a * (1/2) * (1 if a >= b * 2 else 0)re += c * (0 if a >= b * 2 else 1)re += b * (0 if a >= c * 2 else 1)return re / (a + b + c)print(max(calc(p, q, r), calc(q, r, p), calc(r, p, q)))