結果

問題 No.1835 Generalized Monty Hall Problem
ユーザー tamato
提出日時 2022-02-11 21:28:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 1,000 ms
コード長 309 bytes
コンパイル時間 237 ms
コンパイル使用メモリ 82,552 KB
実行使用メモリ 52,608 KB
最終ジャッジ日時 2024-06-27 17:04:57
合計ジャッジ時間 1,484 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    from math import gcd
    input = sys.stdin.readline

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

    upper = M * (N - 1)
    lower = N * (N - K - 1)
    g = gcd(upper, lower)
    print(upper // g, lower // g)


if __name__ == '__main__':
    main()
0