結果

問題 No.1835 Generalized Monty Hall Problem
ユーザー KudeKude
提出日時 2022-02-11 21:29:46
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 252 ms / 1,000 ms
コード長 184 bytes
コンパイル時間 425 ms
コンパイル使用メモリ 86,612 KB
実行使用メモリ 88,920 KB
最終ジャッジ日時 2023-09-10 00:54:43
合計ジャッジ時間 5,383 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 243 ms
88,916 KB
testcase_01 AC 248 ms
88,536 KB
testcase_02 AC 244 ms
88,812 KB
testcase_03 AC 250 ms
88,916 KB
testcase_04 AC 252 ms
88,912 KB
testcase_05 AC 250 ms
88,620 KB
testcase_06 AC 246 ms
88,856 KB
testcase_07 AC 244 ms
88,912 KB
testcase_08 AC 249 ms
88,540 KB
testcase_09 AC 242 ms
88,808 KB
testcase_10 AC 247 ms
88,820 KB
testcase_11 AC 245 ms
88,908 KB
testcase_12 AC 244 ms
88,856 KB
testcase_13 AC 246 ms
88,720 KB
testcase_14 AC 246 ms
88,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from fractions import Fraction
n, m, k = map(int, input().split())
ans = max(Fraction(m, n), Fraction(m * (m - 1) + (n - m) * m, n * (n - 1 - k)))
print(ans.numerator, ans.denominator)
0