結果
問題 |
No.1113 二つの整数 / Two Integers
|
ユーザー |
![]() |
提出日時 | 2020-07-17 22:13:26 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 592 bytes |
コンパイル時間 | 2,060 ms |
コンパイル使用メモリ | 199,532 KB |
最終ジャッジ日時 | 2025-01-11 22:48:33 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 WA * 2 TLE * 5 |
ソースコード
#define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) v.begin(), v.end() typedef long long ll; #include <bits/stdc++.h> using namespace std; int main() { ll a,b; cin>>a>>b; ll m=gcd(a,b); ll cnt2=0; while(m>1 && m%2==0){ cnt2++; m/=2; } if(cnt2%2==1){ cout<<"Even"<<endl; return 0; } map<int,int> c; for(int i=3;i*i<=m;i+=2){ if(m%i==0){ c[i]++; m/=i; } } bool flag=true; for(auto x:c){ if(x.second%1==0) flag=false; } if(b) cout<<"Odd"<<endl; else cout<<"Even"<<endl; return 0; }