結果
問題 | No.1113 二つの整数 / Two Integers |
ユーザー | uw_yu1rabbit |
提出日時 | 2020-08-16 00:20:57 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 535 bytes |
コンパイル時間 | 801 ms |
コンパイル使用メモリ | 102,232 KB |
実行使用メモリ | 10,140 KB |
最終ジャッジ日時 | 2024-04-19 12:10:52 |
合計ジャッジ時間 | 5,022 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
10,140 KB |
testcase_01 | AC | 1 ms
6,944 KB |
testcase_02 | AC | 149 ms
6,944 KB |
testcase_03 | TLE | - |
testcase_04 | TLE | - |
testcase_05 | AC | 981 ms
6,944 KB |
testcase_06 | AC | 2 ms
6,944 KB |
testcase_07 | AC | 1 ms
6,944 KB |
testcase_08 | TLE | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
ソースコード
#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; }