結果

問題 No.1113 二つの整数 / Two Integers
ユーザー beet
提出日時 2020-07-17 22:12:10
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 715 bytes
コンパイル時間 3,552 ms
コンパイル使用メモリ 198,500 KB
最終ジャッジ日時 2025-01-11 22:47:02
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13 TLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
using Int = long long;
const char newl = '\n';


template<typename T>
map<T, Int> factorize(T x){
  map<T, Int> res;
  for(Int i=2;i*i<=x;i++){
    while(x%i==0){
      x/=i;
      res[i]++;
    }
  }
  if(x!=1) res[x]++;
  return res;
}

//INSERT ABOVE HERE
signed main(){
  cin.tie(0);
  ios::sync_with_stdio(0);

  Int a,b;
  cin>>a>>b;
  Int g=gcd(a,b);

  auto mp=factorize(g);
  Int x=1;
  for(auto p:mp){
    x*=p.second+1;
    x%=2;
  }
  if(x) cout<<"Odd"<<endl;
  else cout<<"Even"<<endl;
  return 0;
}
0