結果

問題 No.1113 二つの整数 / Two Integers
ユーザー ttrttr
提出日時 2020-07-17 21:27:33
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 441 bytes
コンパイル時間 502 ms
コンパイル使用メモリ 87,296 KB
実行使用メモリ 76,504 KB
最終ジャッジ日時 2023-08-19 23:35:49
合計ジャッジ時間 5,505 ms
ジャッジサーバーID
(参考情報)
judge14 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
75,876 KB
testcase_01 AC 76 ms
71,296 KB
testcase_02 AC 845 ms
76,504 KB
testcase_03 AC 652 ms
76,152 KB
testcase_04 AC 705 ms
76,448 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 #

A,B = map(int, input().split())

def gcd(a, b):
    if a < b:
        a, b = b, a
    if a%b == 0:
        return b
    return gcd(b, a%b)

M = gcd(A, B)
dic = {}
i = 2
while i <= M**0.5:
    if M%i == 0:
        cnt = 0
        while M%i == 0:
            M //= i
            cnt += 1
        dic[i] = cnt
    i += 1
if M > 1:
    dic[M] = 1

ans = "Odd"
for key in dic:
    if dic[key]%2 == 1:
        ans = "Even"
        break
print(ans)
0