結果
| 問題 |
No.1835 Generalized Monty Hall Problem
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2022-02-15 00:12:28 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 307 bytes |
| コンパイル時間 | 424 ms |
| コンパイル使用メモリ | 64,676 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-29 06:57:29 |
| 合計ジャッジ時間 | 955 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 11 |
ソースコード
#include <iostream>
using namespace std;
long long gcd(long long a, long long b){
if(a%b){
return gcd(b,a%b);
}else{
return b;
}
}
int main(){
long long n,m,k;cin>>n>>m>>k;
cout << m*(n-1)/gcd(m*(n-1),n*(n-(k+1))) << " " << n*(n-(k+1))/gcd(m*(n-1),n*(n-(k+1))) << endl;
}