結果

問題 No.1113 二つの整数 / Two Integers
ユーザー abc3abc3
提出日時 2020-07-17 22:34:11
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 836 bytes
コンパイル時間 1,700 ms
コンパイル使用メモリ 170,308 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-05-07 09:48:07
合計ジャッジ時間 4,093 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
10,752 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#include <iomanip>
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int INF=1001001001;
vector<pair<int64_t,int64_t>>prime_factorize(int64_t x){
  vector<pair<int64_t,int64_t>>p;
  for(int64_t i=2;i*i<=x;i++){
    int cnt=0;
    if(x%i==0){
    while(x%i==0){cnt++;x/=i;}
    p.push_back(make_pair(i,cnt));
    }
  }
  if(x!=1){p.push_back(make_pair(x,1));}
  return p; 
}


int main() {
  int64_t A,B;
  cin>>A>>B;
  int64_t cnt=0;
  for(int i=1;i*i<=A;i++){
    if(A%i==0){
      int a=A/i;
      if(B%i==0){cnt++;}
      if(B%a==0){cnt++;}
    }
  }
  if(cnt%2==0){cout<<"Even"<<endl;}
  else{cout<<"Odd"<<endl;}
  return 0;
}
0