結果

問題 No.882 約数倍数
ユーザー brthyyjpbrthyyjp
提出日時 2020-03-16 04:00:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 500 ms
コード長 395 bytes
コンパイル時間 407 ms
コンパイル使用メモリ 87,324 KB
実行使用メモリ 71,912 KB
最終ジャッジ日時 2023-08-18 04:27:07
合計ジャッジ時間 2,596 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,476 KB
testcase_01 AC 76 ms
71,600 KB
testcase_02 AC 74 ms
71,876 KB
testcase_03 AC 77 ms
71,732 KB
testcase_04 AC 74 ms
71,848 KB
testcase_05 AC 75 ms
71,384 KB
testcase_06 AC 76 ms
71,644 KB
testcase_07 AC 74 ms
71,912 KB
testcase_08 AC 76 ms
71,596 KB
testcase_09 AC 74 ms
71,692 KB
testcase_10 AC 75 ms
71,716 KB
testcase_11 AC 74 ms
71,812 KB
testcase_12 AC 73 ms
71,424 KB
testcase_13 AC 82 ms
71,300 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b = map(int, input().split())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    #divisors.sort(reverse=True)
    return divisors

l = make_divisors(a)
for i in l:
    if i%b == 0:
        print('YES')
        exit()
else:
    print('NO')
0