結果

問題 No.1113 二つの整数 / Two Integers
ユーザー kariya1975
提出日時 2020-07-18 09:07:45
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 515 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-30 20:25:19
合計ジャッジ時間 1,396 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 1 RE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

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

limit = max(A, B)
sieve = [True] * limit

for i in range(2, int(limit ** 0.5)):
    if not sieve[i]: 
        continue
    for j in range(2, limit // i):
        sieve[i * j] = False

for i in range(2, int(limit ** 0.5)):
    if not sieve[i]: 
        continue;
    a = 0
    b = 0
    while A % sieve[i] == 0:
        A /= i
        a += 1
    while B % i == 0 and b <= a:
        B /= i
        b += 1
    if min(a, b) % 2 == 1:
        print("Even")
        exit()
print("Odd")
0