結果
| 問題 |
No.1113 二つの整数 / Two Integers
|
| コンテスト | |
| ユーザー |
Captain
|
| 提出日時 | 2020-07-17 21:27:52 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,167 bytes |
| コンパイル時間 | 1,546 ms |
| コンパイル使用メモリ | 173,008 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2024-11-29 21:21:38 |
| 合計ジャッジ時間 | 12,431 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 10 TLE * 5 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
#define rep(i,m,n) for(int (i)=(m);(i)<(n);++(i))
#define rREP(i,m,n) for(int (i)=(n)-1;(i)>=(m);--(i))
#define all(x) (x).begin(),(x).end()
#define out(y,x,h,w) (y)<0||(x)<0||(y)>=(h)||(x)>=(w)
constexpr int INF = 1000000001;
constexpr ll mod = 1000000007;
constexpr double PI = 3.1415926535897932;
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;
}
inline void init() {
cin.tie(nullptr); cout.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(15);
}
ll gcd(ll x, ll y) { return (y ? gcd(y, x % y) : x); }
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }
int main() {
init();
ll A, B; cin >> A >> B;
ll num = gcd(A, B);
map<int, ll>mp;
for (int i = 2;i * i <= num;++i) {
while (num % i == 0) {
mp[i]++;
num /= i;
}
}
bool ans = false;
for (auto p : mp) {
if ((p.second + 1) % 2 == 0)ans = true;
}
cout << (ans ? "Even" : "Odd") << "\n";
return 0;
}
Captain