結果
| 問題 | 
                            No.1113 二つの整数 / Two Integers
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-07-17 21:49:33 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 485 bytes | 
| コンパイル時間 | 198 ms | 
| コンパイル使用メモリ | 82,336 KB | 
| 実行使用メモリ | 117,760 KB | 
| 最終ジャッジ日時 | 2024-11-29 23:14:17 | 
| 合計ジャッジ時間 | 6,294 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 8 WA * 5 TLE * 2 | 
ソースコード
import collections
def get_primes(n):
    res = []
    x = 2
    while n >= x*x:
        while n % x == 0:
            n //= x
            res.append(x)
        x += 1
    if n != 1:
        res.append(n)
    return res
a, b = map(int, input().split())
ctr_a = collections.Counter(get_primes(a))
ctr_b = collections.Counter(get_primes(b))
res = 0
for x in ctr_b & ctr_a:
    res += (ctr_a[x] + 1) * (ctr_b[x] + 1)
if res == 0 or res % 2 == 1:
    print('Odd')
else:
    print('Even')