結果
| 問題 |
No.1113 二つの整数 / Two Integers
|
| コンテスト | |
| ユーザー |
mag
|
| 提出日時 | 2020-07-17 23:17:04 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 896 bytes |
| コンパイル時間 | 1,766 ms |
| コンパイル使用メモリ | 172,356 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-30 02:57:45 |
| 合計ジャッジ時間 | 2,940 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 1 WA * 11 RE * 3 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep2(i, a, n) for(int i = (a); i < (n); i++)
#define rep(i, n) rep2(i,0,n)
template<typename S,typename T,typename U>void flagfunc1(S flag,T A,U B){flag?cout<<A<<'\n':cout<<B<<'\n';}
vector<ll> divisor(int n){
vector<ll> res;
for(int i=1;i*i<=n;i++){
if(n%i==0){
res.push_back(i);
if(i!=n/i) res.push_back(n/i);
}
}
return res;
}
int main(){
cin.tie(nullptr);ios_base::sync_with_stdio(false);
ll a,b;cin>>a>>b;
vector<ll> c,d;
c=divisor(a);
d=divisor(b);
sort(c.begin(),c.end());
sort(d.begin(),d.end());
/*
rep(i,c.size())cout<<c[i]<<" ";
cout<<endl;
rep(i,d.size())cout<<d[i]<<" ";
cout<<endl;
*/
ll cnt=0,e=0,f=0;
for(int e=0;e<c.size();e++){
if(c[e]==d[f]){
cnt++;
f++;
}
}
//cout<<cnt<<endl;
flagfunc1(cnt%2,"Odd","Even");
}
mag