結果

問題 No.1113 二つの整数 / Two Integers
ユーザー Shawn stayCShawn stayC
提出日時 2020-07-22 22:01:05
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 357 bytes
コンパイル時間 4,367 ms
コンパイル使用メモリ 205,112 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-09-04 20:14:01
合計ジャッジ時間 9,158 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,860 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 155 ms
4,380 KB
testcase_03 TLE -
testcase_04 TLE -
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;
#define rep(i,n) for(int i=0; i<(n); i++)
typedef long long ll;

int main(){
	ll a,b; cin>>a>>b;
	ll n=gcd(a,b);
	
	set<ll> st;
	for(ll i=1; i*i<=n; i++){
		if(n%i==0) {st.insert(i); st.insert(n/i);}
	}
	if(st.size()==0) cout<<"Odd"<<endl;
	else if(st.size()%2==0) cout<<"Even"<<endl;
	else cout<<"Odd"<<endl;
}
0