結果

問題 No.2417 Div Count
ユーザー hotate29
提出日時 2023-08-12 13:54:13
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 342 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-19 16:34:04
合計ジャッジ時間 3,180 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 4 WA * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

def divisors(n: int):
    upper = []
    lower = []
    i = 1
    while i * i <= n:
        if n % i == 0:
            lower.append(i)
            if i != n // i:
                upper.append(n // i)
        i += 1
    return lower + upper[::-1]


n, k = map(int, input().split())
x = n - k
d = divisors(x)
ans = len(d) - (k != 0)
print(ans)
0