結果
| 問題 | No.1113 二つの整数 / Two Integers |
| コンテスト | |
| ユーザー |
keijak
|
| 提出日時 | 2020-07-17 21:38:08 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,072 bytes |
| コンパイル時間 | 2,757 ms |
| コンパイル使用メモリ | 191,964 KB |
| 最終ジャッジ日時 | 2025-01-11 22:23:20 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 TLE * 7 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
using u64 = unsigned long long;
#define REP(i, n) for (int i = 0; (i64)(i) < (i64)(n); ++i)
#ifdef ENABLE_DEBUG
template <typename T>
void debug(T value) {
cerr << value;
}
template <typename T, typename... Ts>
void debug(T value, Ts... args) {
cerr << value << ", ";
debug(args...);
}
#define DEBUG(...) \
do { \
cerr << " \033[33m (L" << __LINE__ << ") "; \
cerr << #__VA_ARGS__ << ":\033[0m "; \
debug(__VA_ARGS__); \
cerr << endl; \
} while (0)
#else
#define debug(...)
#define DEBUG(...)
#endif
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
i64 A, B;
cin >> A >> B;
i64 g = std::gcd(A, B);
i64 k = 1;
i64 cnt = 0;
for (k = 1; k * k <= g; ++k) {
if (g % k == 0) {
if (g / k > k) {
cnt += 2;
} else {
cnt++;
}
}
}
cout << (cnt % 2 == 1 ? "Odd" : "Even") << endl;
}
keijak