結果

問題 No.2417 Div Count
ユーザー dmasupro
提出日時 2023-08-12 14:21:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 451 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 82,312 KB
実行使用メモリ 60,092 KB
最終ジャッジ日時 2024-11-19 18:47:22
合計ジャッジ時間 3,308 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8 WA * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        # print(n, i, n % i)
        if n % i == 0:
            if i > K:
                lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
        
    return lower_divisors + upper_divisors[::-1]

N, K = list(map(int, input().split()))
ans = make_divisors(N-K)
# print(ans)
print(len(ans))
0