結果

問題 No.1835 Generalized Monty Hall Problem
ユーザー shinichishinichi
提出日時 2022-02-12 12:15:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 1,000 ms
コード長 180 bytes
コンパイル時間 1,084 ms
コンパイル使用メモリ 87,208 KB
実行使用メモリ 71,520 KB
最終ジャッジ日時 2023-09-10 23:20:13
合計ジャッジ時間 3,254 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,168 KB
testcase_01 AC 73 ms
71,468 KB
testcase_02 AC 73 ms
71,520 KB
testcase_03 AC 73 ms
71,136 KB
testcase_04 AC 71 ms
71,516 KB
testcase_05 AC 72 ms
71,200 KB
testcase_06 AC 71 ms
71,244 KB
testcase_07 AC 72 ms
71,492 KB
testcase_08 AC 73 ms
71,248 KB
testcase_09 AC 72 ms
71,460 KB
testcase_10 AC 74 ms
71,432 KB
testcase_11 AC 74 ms
71,236 KB
testcase_12 AC 71 ms
71,328 KB
testcase_13 AC 72 ms
71,312 KB
testcase_14 AC 73 ms
71,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math


N, M, K = map(int, input().split())

# 当たりを選んでいた
u = M * (M-1)
l = N * (N-K-1)

uu = (N-M) * M

u = u + uu
g = math.gcd(u, l)
print(u // g, l // g)
0