結果

問題 No.1224 I hate Sqrt Inequality
ユーザー akiku
提出日時 2021-11-28 06:16:11
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 577 bytes
コンパイル時間 504 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-30 21:26:21
合計ジャッジ時間 2,708 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 10 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

# Input #######################################
N, M = list(map(int, input().split()))
# 2 9
# MAIN #######################################


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


x = prime_factorize(M)
x = set(x)

if all([i == 2 or i == 5 for i in x]):
    print("No")
else:
    print("Yes")

# END #######################################
0