結果
問題 |
No.1113 二つの整数 / Two Integers
|
ユーザー |
![]() |
提出日時 | 2020-08-16 00:17:10 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 516 bytes |
コンパイル時間 | 1,314 ms |
コンパイル使用メモリ | 99,160 KB |
最終ジャッジ日時 | 2025-01-13 01:45:53 |
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 4 WA * 4 TLE * 7 |
ソースコード
#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; }