結果
問題 |
No.1113 二つの整数 / Two Integers
|
ユーザー |
|
提出日時 | 2020-07-17 21:32:43 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 762 bytes |
コンパイル時間 | 1,327 ms |
コンパイル使用メモリ | 105,636 KB |
最終ジャッジ日時 | 2025-01-11 22:17:12 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 WA * 3 TLE * 1 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <queue> #include <cstdio> #include <ctime> #include <assert.h> #include <chrono> #include <random> #include <numeric> #include <set> using namespace std; typedef long long int ll; typedef unsigned long long ull; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll a,b; cin >> a >> b; if(a==b){ printf("Even\n"); return 0; } ll g=__gcd(a,b); bool ok=0; for(ll i=2;i*i<=g;i++){ if(g%i==0){ int cnt=0; while(g%i==0){ g/=i; cnt++; } if(cnt%2)ok=1; } } if(g>1)ok=1; if(ok)printf("Even\n"); else printf("Odd\n"); }