結果
問題 | No.1113 二つの整数 / Two Integers |
ユーザー |
![]() |
提出日時 | 2023-11-28 00:44:48 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 658 bytes |
コンパイル時間 | 1,912 ms |
コンパイル使用メモリ | 192,784 KB |
最終ジャッジ日時 | 2025-02-18 02:11:23 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 WA * 3 RE * 7 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll=long long;#include <assert.h>long long isqrt(long long n){assert(n>=0);if(n==0){return 0LL;}long long c=0,v=n;while(v>0){v>>=1;c++;}c--;c>>=1;long long a=1,d=0;v=c;c=0;while(v>0){v>>=1;c++;}for(long long s=0;s<c;s++){long long e=d;d=c>>s;assert(a);a=(a << d-e-1)+(n >> 2*c-e-d+1)/a;}return a-(a*a>n);}ll gcd(ll x,ll y){if(!y)return x;return gcd(y,x%y);}int main(){ll A,B;cin>>A>>B;ll X=gcd(A,B);if(isqrt(X)*isqrt(X)==X){cout<<"Odd"<<endl;}else{cout<<"Even"<<endl;}}