結果

問題 No.1113 二つの整数 / Two Integers
ユーザー MASATO338MASATO338
提出日時 2020-08-09 16:11:31
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 528 bytes
コンパイル時間 1,864 ms
コンパイル使用メモリ 163,524 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-15 07:09:26
合計ジャッジ時間 2,364 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using ll = long long;
using namespace std;
const int INFint = 1e9+1;
const ll INFll = (ll)1e18+1;
ll MOD=1e9+7;

ll gcd(ll a, ll b) { return __gcd(a,b); } //最大公約数
ll lcm(ll a, ll b) { return a/gcd(a,b)*b; } //最小公倍数

int main(){
  ll a,b;
  cin>>a>>b;
  ll x = gcd(a,b);
  for(int i(2);i<=1000000;i++){
    int cnt(0);
    while(x%i==0){
      cnt++;
      x /= i;
    }
    if(cnt%2==1){
      cout << "Even" << endl;
      return 0;
    }
  }
  cout << "Odd" << endl;
  return 0;
}
0