結果

問題 No.2051 Divide
ユーザー hellopra
提出日時 2022-09-11 10:59:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 46 ms / 2,000 ms
コード長 411 bytes
コンパイル時間 404 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 58,624 KB
最終ジャッジ日時 2024-11-27 19:44:04
合計ジャッジ時間 2,448 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
    
A,B = map(int,input().split())
cnt = 0
for i in make_divisors(A):
    if i % B == 0:
        cnt += 1

print(cnt)
0