結果

問題 No.1835 Generalized Monty Hall Problem
ユーザー lam6er
提出日時 2025-03-20 20:42:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 1,000 ms
コード長 194 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 82,800 KB
実行使用メモリ 53,804 KB
最終ジャッジ日時 2025-03-20 20:42:31
合計ジャッジ時間 1,311 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

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

numerator = M * (N - 1)
denominator = N * (N - K - 1)

g = math.gcd(numerator, denominator)
p = numerator // g
q = denominator // g

print(p, q)
0