結果

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

ソースコード

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