結果
| 問題 |
No.1113 二つの整数 / Two Integers
|
| ユーザー |
ゆにぽけ
|
| 提出日時 | 2023-10-15 18:09:01 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 787 bytes |
| コンパイル時間 | 932 ms |
| コンパイル使用メモリ | 119,800 KB |
| 最終ジャッジ日時 | 2025-02-17 07:57:12 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 |
ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>
#include<cassert>
#include<cmath>
#include<ctime>
#include<iomanip>
#include<numeric>
#include<stack>
#include<queue>
#include<map>
#include<unordered_map>
#include<set>
#include<unordered_set>
#include<bitset>
#include<random>
using namespace std;
long long gcd(long long a,long long b)
{
while(b)
{
a %= b;
swap(a,b);
}
return a;
}
void solve()
{
long long A,B;
cin >> A >> B;
long long G = gcd(A,B);
long long ok = 1,ng = (long long)2e9;
while(ng-ok > 1)
{
long long mid = (ok+ng)/2;
if(mid*mid <= G) ok = mid;
else ng = mid;
}
cout << (ok*ok == G ? "Odd":"Even") << endl;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int tt = 1;
//cin >> tt;
while(tt--) solve();
}
ゆにぽけ