結果

問題 No.1113 二つの整数 / Two Integers
ユーザー uw_yu1rabbituw_yu1rabbit
提出日時 2020-08-16 00:20:57
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 535 bytes
コンパイル時間 1,027 ms
コンパイル使用メモリ 99,032 KB
最終ジャッジ日時 2025-01-13 01:46:13
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8 TLE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<numeric>
#include<set>
using namespace std;
using ll = long long;
set<ll> enum_divisors(ll n){
    set<ll> res;
    for(ll i = 1; i <= sqrt(n); i++){
        if(n % i == 0){
            res.insert(i);
            if(n / i != i)
                res.insert(n / i);
        }
    }
    return res;
}
int main(){
    ll a,b;
    cin >> a >> b;
    ll g = gcd(a,b);
    set<ll> k = enum_divisors(g);
    cout << (k.size() % 2 == 0 ? "Even" : "Odd") << endl;
}
0