結果

問題 No.1113 二つの整数 / Two Integers
ユーザー hotate29
提出日時 2020-10-13 01:47:28
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 436 bytes
コンパイル時間 230 ms
コンパイル使用メモリ 81,912 KB
実行使用メモリ 66,360 KB
最終ジャッジ日時 2024-07-20 18:16:15
合計ジャッジ時間 4,873 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 6 TLE * 2 -- * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd
 
 
def pf(n):
    r = []
    for p in range(2, n):
        if p * p > n:
            break
        e = 0
        if n % p == 0:
            while(n % p == 0):
                n //= p
                e += 1
            r.append((p, e))
    if n != 1:
        r.append((n, 1))
    return r


a,b = map(int,input().split())
g = gcd(a,b)
c = pf(g)
ans = 1
for p,e in c:
    ans *= e+1
print("Odd" if ans%2 else "Even")
0