結果

問題 No.1224 I hate Sqrt Inequality
ユーザー akikuakiku
提出日時 2021-11-28 06:19:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 609 bytes
コンパイル時間 650 ms
コンパイル使用メモリ 10,892 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2023-09-13 12:26:02
合計ジャッジ時間 3,012 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,848 KB
testcase_01 AC 16 ms
7,768 KB
testcase_02 AC 16 ms
7,808 KB
testcase_03 AC 16 ms
7,884 KB
testcase_04 WA -
testcase_05 AC 18 ms
7,972 KB
testcase_06 AC 28 ms
7,868 KB
testcase_07 WA -
testcase_08 AC 16 ms
7,848 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 16 ms
7,788 KB
testcase_13 WA -
testcase_14 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# Input #######################################
N, M = list(map(int, input().split()))
# 1000000007 2000000014
# 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 M % N == 0 or all([i == 2 or i == 5 for i in x]):
    print("No")
else:
    print("Yes")

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