結果

問題 No.1835 Generalized Monty Hall Problem
ユーザー H3PO4H3PO4
提出日時 2022-02-11 21:28:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 37 ms / 1,000 ms
コード長 172 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 9,828 KB
最終ジャッジ日時 2023-09-10 00:51:15
合計ジャッジ時間 2,160 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
9,688 KB
testcase_01 AC 37 ms
9,488 KB
testcase_02 AC 32 ms
9,812 KB
testcase_03 AC 37 ms
9,620 KB
testcase_04 AC 35 ms
9,676 KB
testcase_05 AC 36 ms
9,828 KB
testcase_06 AC 33 ms
9,808 KB
testcase_07 AC 37 ms
9,624 KB
testcase_08 AC 32 ms
9,660 KB
testcase_09 AC 37 ms
9,668 KB
testcase_10 AC 33 ms
9,596 KB
testcase_11 AC 36 ms
9,692 KB
testcase_12 AC 35 ms
9,684 KB
testcase_13 AC 35 ms
9,628 KB
testcase_14 AC 32 ms
9,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from fractions import Fraction

N, M, K = map(int, input().split())
ans = max(Fraction(M, N), Fraction(M * (N - 1), N * (N - K - 1)))
print(ans.numerator, ans.denominator)
0