結果
問題 | No.1113 二つの整数 / Two Integers |
ユーザー |
|
提出日時 | 2020-07-17 21:43:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 526 ms / 1,000 ms |
コード長 | 866 bytes |
コンパイル時間 | 716 ms |
コンパイル使用メモリ | 81,156 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-30 06:30:12 |
合計ジャッジ時間 | 2,957 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
#include <iostream> #include <algorithm> #include <tuple> #include <vector> #include <string> #include <queue> #include <cmath> #include <set> #include <map> #include <cassert> using namespace std; using ll = long long; template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } ll gcd(ll a, ll b){ if(a%b == 0) return b; return gcd(b, a%b); } int main() { ll a, b; cin >> a >> b; ll g = gcd(a, b); if(g == 1){ cout << "Odd" << endl; return 0; } for(ll i = 2; i*i <= g; i++){ if(i * i == g){ cout << "Odd" << endl; return 0; } } cout << "Even" << endl; return 0; }