結果
| 問題 |
No.1113 二つの整数 / Two Integers
|
| コンテスト | |
| ユーザー |
Dske
|
| 提出日時 | 2020-07-17 21:38:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 545 bytes |
| コンパイル時間 | 1,519 ms |
| コンパイル使用メモリ | 167,728 KB |
| 実行使用メモリ | 16,960 KB |
| 最終ジャッジ日時 | 2024-11-29 22:24:07 |
| 合計ジャッジ時間 | 28,257 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 2 TLE * 13 |
ソースコード
#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>;
// a と b の最大公約数を返す関数
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(int i = 1; i<= c; i++){
if(c % i ==0) x++;
}
string ans;
if(x % 2 == 0) ans = "Even";
else ans = "Odd";
cout << ans << endl;
return 0;
}
Dske