結果

問題 No.882 約数倍数
ユーザー brthyyjp
提出日時 2020-03-16 04:00:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 500 ms
コード長 395 bytes
コンパイル時間 587 ms
コンパイル使用メモリ 82,044 KB
実行使用メモリ 53,384 KB
最終ジャッジ日時 2024-11-27 07:07:01
合計ジャッジ時間 1,346 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

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