結果

問題 No.1113 二つの整数 / Two Integers
ユーザー uw_yu1rabbituw_yu1rabbit
提出日時 2020-08-16 00:17:10
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 516 bytes
コンパイル時間 938 ms
コンパイル使用メモリ 102,752 KB
実行使用メモリ 13,888 KB
最終ジャッジ日時 2024-04-19 12:07:45
合計ジャッジ時間 4,848 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
13,888 KB
testcase_01 AC 1 ms
6,812 KB
testcase_02 WA -
testcase_03 TLE -
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
権限があれば一括ダウンロードができます

ソースコード

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 k = gcd(a,b);
    enum_divisors(k);
    cout << (k % 2 == 0 ? "Even" : "Odd") << endl;
}
0