結果

問題 No.882 約数倍数
ユーザー NagisaNagisa
提出日時 2019-09-13 21:30:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 500 ms
コード長 252 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 87,288 KB
実行使用メモリ 71,696 KB
最終ジャッジ日時 2023-09-17 06:57:26
合計ジャッジ時間 2,079 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,248 KB
testcase_01 AC 71 ms
71,576 KB
testcase_02 AC 73 ms
71,408 KB
testcase_03 AC 71 ms
71,244 KB
testcase_04 AC 71 ms
71,360 KB
testcase_05 AC 71 ms
71,440 KB
testcase_06 AC 72 ms
71,404 KB
testcase_07 AC 71 ms
71,692 KB
testcase_08 AC 71 ms
71,348 KB
testcase_09 AC 71 ms
71,352 KB
testcase_10 AC 72 ms
71,364 KB
testcase_11 AC 72 ms
71,696 KB
testcase_12 AC 72 ms
71,360 KB
testcase_13 AC 71 ms
71,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N, B = map(int,input().split())
P = [1,N]
for k in range(2,math.floor(math.sqrt(N))+1):
    if N % k == 0:
        P.append(k)
        P.append(N//k)

for k in range(1,101):
    if k*B in P:
        print("YES")
        exit(0)
print("NO")
0