結果
| 問題 |
No.1835 Generalized Monty Hall Problem
|
| コンテスト | |
| ユーザー |
srjywrdnprkt
|
| 提出日時 | 2023-05-24 00:24:59 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 438 bytes |
| コンパイル時間 | 746 ms |
| コンパイル使用メモリ | 104,920 KB |
| 最終ジャッジ日時 | 2025-02-13 04:18:14 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 11 |
ソースコード
#include <iostream>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <iomanip>
#include <queue>
#include <algorithm>
#include <numeric>
#include <deque>
#include <complex>
#include <cassert>
using namespace std;
using ll = long long;
int main(){
ll N, M, K, a, b, g;
cin >> N >> M >> K;
a = M * (N-1);
b = N * (N-K-1);
g = gcd(a, b);
cout << a/g << " " << b/g << endl;
return 0;
}
srjywrdnprkt