結果

問題 No.1835 Generalized Monty Hall Problem
ユーザー ripity
提出日時 2022-02-11 21:42:31
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 1,000 ms
コード長 103 bytes
コンパイル時間 700 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-27 17:40:12
合計ジャッジ時間 1,246 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N,M,K = map(int,input().split())
P,Q = M*(N-1),N*(N-K-1)
G = math.gcd(P,Q)
print(P//G,Q//G)
0