結果
問題 | No.1113 二つの整数 / Two Integers |
ユーザー |
|
提出日時 | 2020-07-17 21:25:43 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 846 bytes |
コンパイル時間 | 1,728 ms |
コンパイル使用メモリ | 166,628 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-29 21:07:01 |
合計ジャッジ時間 | 2,389 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 WA * 3 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long int ll;typedef pair<ll, ll> pll;#define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i))#define REP(i, n) FOR(i,n,0)#define OF64 std::setprecision(10)const ll MOD = 1000000007;const ll INF = (ll) 1e15;ll gcd(ll a, ll b) {if (a < b)swap(a, b);ll c = a % b;if (c == 0)return b;return gcd(b, c);}int main() {cin.tie(0);ios::sync_with_stdio(false);ll A, B;cin >> A >> B;ll X = gcd(A, B);if (X == 1) {cout << "Odd" << endl;return 0;}ll n = 2;while (true) {ll x = n * n;if (x * x > X)break;if (X % x == 0) {cout << "Odd" << endl;return 0;}n++;}cout << "Even" << endl;return 0;}