結果
問題 | No.1113 二つの整数 / Two Integers |
ユーザー |
|
提出日時 | 2020-07-17 21:51:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 796 bytes |
コンパイル時間 | 1,348 ms |
コンパイル使用メモリ | 165,772 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-11-29 23:22:18 |
合計ジャッジ時間 | 7,530 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 TLE * 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);ll n = 2;while (true) {ll x = n * n;if (x > X)break;while (X % x == 0) {X /= x;}n++;}if (X > 1)cout << "Even" << endl;elsecout << "Odd" << endl;return 0;}