結果

問題 No.2051 Divide
ユーザー ohana
提出日時 2023-10-02 11:08:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 387 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 82,524 KB
実行使用メモリ 59,136 KB
最終ジャッジ日時 2024-07-26 13:41:10
合計ジャッジ時間 2,336 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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())
print(sum(map(lambda x: x % b == 0, make_divisors(a))))
0