結果

問題 No.1835 Generalized Monty Hall Problem
ユーザー brthyyjpbrthyyjp
提出日時 2022-02-12 13:31:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 1,000 ms
コード長 123 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 87,172 KB
実行使用メモリ 71,740 KB
最終ジャッジ日時 2023-09-11 00:47:05
合計ジャッジ時間 2,363 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,740 KB
testcase_01 AC 70 ms
71,652 KB
testcase_02 AC 72 ms
71,120 KB
testcase_03 AC 69 ms
71,308 KB
testcase_04 AC 68 ms
71,344 KB
testcase_05 AC 69 ms
71,416 KB
testcase_06 AC 74 ms
71,352 KB
testcase_07 AC 70 ms
71,104 KB
testcase_08 AC 69 ms
71,180 KB
testcase_09 AC 70 ms
71,488 KB
testcase_10 AC 69 ms
71,436 KB
testcase_11 AC 71 ms
71,276 KB
testcase_12 AC 70 ms
71,648 KB
testcase_13 AC 70 ms
71,352 KB
testcase_14 AC 69 ms
71,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, k = map(int, input().split())
import math
p = m*(n-1)
q = n*(n-k-1)
g = math.gcd(p, q)
p, q = p//g, q//g
print(p, q)
0