結果

問題 No.1113 二つの整数 / Two Integers
ユーザー hotate29hotate29
提出日時 2020-10-13 01:34:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 496 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,936 KB
実行使用メモリ 19,664 KB
最終ジャッジ日時 2023-09-27 23:53:45
合計ジャッジ時間 5,426 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
19,664 KB
testcase_01 AC 29 ms
9,728 KB
testcase_02 TLE -
testcase_03 AC 818 ms
9,948 KB
testcase_04 AC 831 ms
9,924 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
権限があれば一括ダウンロードができます

ソースコード

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
print("Odd" if ans%2 else "Even")
0