結果

問題 No.1113 二つの整数 / Two Integers
ユーザー freecss00
提出日時 2020-07-17 21:55:25
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 432 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 117,504 KB
最終ジャッジ日時 2024-11-29 23:34:07
合計ジャッジ時間 5,574 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13 TLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
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())
g = math.gcd(a, b)
ctr = collections.Counter(get_primes(g))
res = 1
for x in ctr.values():
    res *= x + 1
if res % 2 == 1:
    print('Odd')
else:
    print('Even')
0