結果
問題 | No.1113 二つの整数 / Two Integers |
ユーザー |
![]() |
提出日時 | 2023-11-28 00:41:38 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 591 bytes |
コンパイル時間 | 6,853 ms |
コンパイル使用メモリ | 252,260 KB |
最終ジャッジ日時 | 2025-02-18 02:11:14 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 2 RE * 12 TLE * 1 |
ソースコード
#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; for(long long s=0;s<c;s++){ long long e=d; d=c>>s; 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; } }