結果
| 問題 | No.1113 二つの整数 / Two Integers |
| コンテスト | |
| ユーザー |
forest3
|
| 提出日時 | 2020-07-20 09:57:55 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 466 bytes |
| コンパイル時間 | 2,153 ms |
| コンパイル使用メモリ | 174,796 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-12-23 05:00:50 |
| 合計ジャッジ時間 | 6,325 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 TLE * 2 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long A, B;
cin >> A >> B;
long long gcd = __gcd( A, B );
map<long long, long long> mp;
for( long long x = 2; x * x <= gcd; x++ ) {
while( gcd % x == 0 ) {
mp[x]++;
gcd /= x;
}
}
if( gcd > 1 ) mp[gcd]++;
long long cnt = 1;
for( auto it = mp.begin(); it != mp.end(); it++ ) {
cnt *= (it->second + 1);
}
string ans = "Even";
if( cnt % 2 ) ans = "Odd";
cout << ans << endl;
}
forest3