結果

問題 No.1113 二つの整数 / Two Integers
ユーザー neterukunneterukun
提出日時 2020-07-17 22:02:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 1,000 ms
コード長 327 bytes
コンパイル時間 473 ms
コンパイル使用メモリ 86,940 KB
実行使用メモリ 71,968 KB
最終ジャッジ日時 2023-08-20 06:08:12
合計ジャッジ時間 2,521 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,804 KB
testcase_01 AC 75 ms
71,496 KB
testcase_02 AC 74 ms
71,936 KB
testcase_03 AC 74 ms
71,536 KB
testcase_04 AC 74 ms
71,508 KB
testcase_05 AC 73 ms
71,628 KB
testcase_06 AC 73 ms
71,664 KB
testcase_07 AC 74 ms
71,436 KB
testcase_08 AC 75 ms
71,956 KB
testcase_09 AC 74 ms
71,808 KB
testcase_10 AC 74 ms
71,964 KB
testcase_11 AC 74 ms
71,708 KB
testcase_12 AC 75 ms
71,772 KB
testcase_13 AC 73 ms
71,768 KB
testcase_14 AC 74 ms
71,708 KB
testcase_15 AC 73 ms
71,968 KB
testcase_16 AC 76 ms
71,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def gcd(a: int, b: int) -> int:
    """a, bの最大公約数(greatest common divisor: GCD)を求める
    計算量: O(log(min(a, b)))
    """
    while b:
        a, b = b, a % b
    return a

  
a, b = map(int, input().split())


gcd_ = gcd(a, b)
if int(gcd_ ** 0.5) == gcd_ ** 0.5:
    print("Odd")
else:
    print("Even")
0