結果

問題 No.1835 Generalized Monty Hall Problem
ユーザー 👑 rin204rin204
提出日時 2022-02-11 21:26:21
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 74 ms / 1,000 ms
コード長 145 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 71,796 KB
最終ジャッジ日時 2023-09-10 00:45:10
合計ジャッジ時間 2,653 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,568 KB
testcase_01 AC 73 ms
71,324 KB
testcase_02 AC 73 ms
71,588 KB
testcase_03 AC 72 ms
71,776 KB
testcase_04 AC 72 ms
71,264 KB
testcase_05 AC 71 ms
71,752 KB
testcase_06 AC 72 ms
71,312 KB
testcase_07 AC 71 ms
71,492 KB
testcase_08 AC 71 ms
71,348 KB
testcase_09 AC 70 ms
71,564 KB
testcase_10 AC 72 ms
71,360 KB
testcase_11 AC 71 ms
71,456 KB
testcase_12 AC 72 ms
71,796 KB
testcase_13 AC 72 ms
71,184 KB
testcase_14 AC 72 ms
71,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd

n, m, k = map(int, input().split())

p = m * (m - 1) + (n - m) * m
q = n * (n - k - 1)
g = gcd(p, q)
print(p // g, q // g)
0