結果

問題 No.2417 Div Count
ユーザー moharan627moharan627
提出日時 2023-08-12 13:52:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 922 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 86,908 KB
実行使用メモリ 76,884 KB
最終ジャッジ日時 2023-08-12 13:55:06
合計ジャッジ時間 6,370 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
71,296 KB
testcase_01 AC 95 ms
71,228 KB
testcase_02 AC 96 ms
71,304 KB
testcase_03 AC 98 ms
71,400 KB
testcase_04 AC 95 ms
71,196 KB
testcase_05 AC 95 ms
71,352 KB
testcase_06 AC 96 ms
71,232 KB
testcase_07 AC 95 ms
71,180 KB
testcase_08 AC 94 ms
71,352 KB
testcase_09 AC 97 ms
71,304 KB
testcase_10 AC 96 ms
71,356 KB
testcase_11 AC 97 ms
71,320 KB
testcase_12 AC 98 ms
71,224 KB
testcase_13 AC 98 ms
71,156 KB
testcase_14 AC 97 ms
71,152 KB
testcase_15 AC 98 ms
71,224 KB
testcase_16 AC 96 ms
71,364 KB
testcase_17 AC 95 ms
71,384 KB
testcase_18 AC 99 ms
71,324 KB
testcase_19 AC 97 ms
71,304 KB
testcase_20 AC 100 ms
76,440 KB
testcase_21 AC 97 ms
71,484 KB
testcase_22 AC 96 ms
71,112 KB
testcase_23 AC 101 ms
76,068 KB
testcase_24 AC 102 ms
76,488 KB
testcase_25 AC 100 ms
76,068 KB
testcase_26 AC 104 ms
76,068 KB
testcase_27 AC 103 ms
76,200 KB
testcase_28 AC 101 ms
76,116 KB
testcase_29 AC 99 ms
76,168 KB
testcase_30 AC 103 ms
76,388 KB
testcase_31 AC 100 ms
76,220 KB
testcase_32 AC 103 ms
76,168 KB
testcase_33 AC 100 ms
76,020 KB
testcase_34 AC 104 ms
76,324 KB
testcase_35 AC 104 ms
76,368 KB
testcase_36 AC 101 ms
76,212 KB
testcase_37 AC 103 ms
76,068 KB
testcase_38 AC 125 ms
76,468 KB
testcase_39 AC 106 ms
76,604 KB
testcase_40 AC 101 ms
76,884 KB
testcase_41 AC 101 ms
76,216 KB
testcase_42 AC 94 ms
71,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10**9 + 7
MOD2 = 998244353
from collections import defaultdict
def ceil(A,B):
    return -(-A//B)
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]
def solve():
    def II(): return int(sys.stdin.readline())
    def LI(): return list(map(int, sys.stdin.readline().split()))
    def LC(): return list(sys.stdin.readline().rstrip())
    def IC(): return [int(c) for c in sys.stdin.readline().rstrip()]
    def MI(): return map(int, sys.stdin.readline().split())
    N,K = MI()
    N-=K
    Div = make_divisors(N)
    Ans = 0
    for d in Div:
        if(K<d):
            Ans+=1
    print(Ans)
    return
solve()
0