結果

問題 No.1113 二つの整数 / Two Integers
ユーザー hotate29
提出日時 2020-10-13 01:35:53
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 509 bytes
コンパイル時間 189 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 17,152 KB
最終ジャッジ日時 2024-07-20 18:16:10
合計ジャッジ時間 6,110 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other TLE * 4 -- * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd
from typing import List, Tuple
 
 
def pf(n: int) -> List[Tuple[int,int]]:
    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
    ans %= 2
print("Odd" if ans%2 else "Even")
0