結果

問題 No.882 約数倍数
ユーザー TakoKurageTakoKurage
提出日時 2019-09-13 22:03:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 500 ms
コード長 263 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 7,956 KB
最終ジャッジ日時 2023-09-17 14:22:12
合計ジャッジ時間 1,075 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,912 KB
testcase_01 AC 16 ms
7,920 KB
testcase_02 AC 16 ms
7,872 KB
testcase_03 AC 16 ms
7,956 KB
testcase_04 AC 16 ms
7,860 KB
testcase_05 AC 16 ms
7,856 KB
testcase_06 AC 16 ms
7,852 KB
testcase_07 AC 16 ms
7,876 KB
testcase_08 AC 16 ms
7,916 KB
testcase_09 AC 16 ms
7,784 KB
testcase_10 AC 16 ms
7,836 KB
testcase_11 AC 16 ms
7,904 KB
testcase_12 AC 16 ms
7,788 KB
testcase_13 AC 16 ms
7,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def divisors(N):
    U = int(N ** 0.5) + 1
    L = [i for i in range(1, U) if N % i == 0]
    return L + [N // i for i in reversed(L) if N != i * i]

A, B = map(int, input().split())
if any(d % B == 0 for d in divisors(A)):
    print("YES")
else:
    print("NO")
0