結果

問題 No.2417 Div Count
ユーザー noriocnorioc
提出日時 2023-08-12 15:59:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 49 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 224 ms
コンパイル使用メモリ 82,796 KB
実行使用メモリ 59,364 KB
最終ジャッジ日時 2024-04-30 10:35:43
合計ジャッジ時間 2,734 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,280 KB
testcase_01 AC 33 ms
52,684 KB
testcase_02 AC 32 ms
53,132 KB
testcase_03 AC 32 ms
52,392 KB
testcase_04 AC 33 ms
53,624 KB
testcase_05 AC 32 ms
53,480 KB
testcase_06 AC 32 ms
52,612 KB
testcase_07 AC 32 ms
52,464 KB
testcase_08 AC 32 ms
52,824 KB
testcase_09 AC 33 ms
52,308 KB
testcase_10 AC 32 ms
52,980 KB
testcase_11 AC 31 ms
52,000 KB
testcase_12 AC 37 ms
53,320 KB
testcase_13 AC 32 ms
53,428 KB
testcase_14 AC 31 ms
52,816 KB
testcase_15 AC 33 ms
52,392 KB
testcase_16 AC 32 ms
54,000 KB
testcase_17 AC 33 ms
53,620 KB
testcase_18 AC 34 ms
53,684 KB
testcase_19 AC 34 ms
53,036 KB
testcase_20 AC 34 ms
57,736 KB
testcase_21 AC 32 ms
52,348 KB
testcase_22 AC 32 ms
52,936 KB
testcase_23 AC 36 ms
57,652 KB
testcase_24 AC 34 ms
57,596 KB
testcase_25 AC 35 ms
57,624 KB
testcase_26 AC 35 ms
58,496 KB
testcase_27 AC 33 ms
57,408 KB
testcase_28 AC 34 ms
58,200 KB
testcase_29 AC 34 ms
57,052 KB
testcase_30 AC 34 ms
57,404 KB
testcase_31 AC 34 ms
58,660 KB
testcase_32 AC 38 ms
57,476 KB
testcase_33 AC 36 ms
58,084 KB
testcase_34 AC 37 ms
57,452 KB
testcase_35 AC 44 ms
57,912 KB
testcase_36 AC 41 ms
57,800 KB
testcase_37 AC 41 ms
57,760 KB
testcase_38 AC 49 ms
59,364 KB
testcase_39 AC 45 ms
59,268 KB
testcase_40 AC 41 ms
59,064 KB
testcase_41 AC 38 ms
58,256 KB
testcase_42 AC 33 ms
53,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def divisors(n):
    s = set()
    p = 1
    while p * p <= n:
        if n % p == 0:
            s.add(p)
            s.add(n // p)
        p += 1
    return sorted(s)


N, K = map(int, input().split())

ds = divisors(N - K)
ans = sum(1 for d in ds if d > K)
print(ans)
0