結果
| 問題 |
No.1113 二つの整数 / Two Integers
|
| コンテスト | |
| ユーザー |
Dske
|
| 提出日時 | 2020-07-17 21:52:06 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 557 bytes |
| コンパイル時間 | 1,801 ms |
| コンパイル使用メモリ | 192,100 KB |
| 最終ジャッジ日時 | 2025-01-11 22:34:53 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 TLE * 7 |
ソースコード
#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<(int)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
long long GCD(long long a, long long b) {
if (b == 0) return a;
else return GCD(b, a % b);
}
int main(){
ll a, b;
cin >> a >> b;
ll x = 0;
ll c = GCD(a,b);
for(ll i = 1; i * i <= c; i++){
if(c % i ==0){
x++;
if(c/i != i) x++;
}
}
string ans;
if(x % 2 == 0) ans = "Even";
else ans = "Odd";
cout << ans << endl;
return 0;
}
Dske