結果

問題 No.2417 Div Count
ユーザー lloyzlloyz
提出日時 2023-08-21 00:13:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 253 bytes
コンパイル時間 541 ms
コンパイル使用メモリ 86,944 KB
実行使用メモリ 75,968 KB
最終ジャッジ日時 2023-08-21 00:14:07
合計ジャッジ時間 5,969 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,356 KB
testcase_01 AC 71 ms
71,220 KB
testcase_02 AC 71 ms
71,528 KB
testcase_03 AC 72 ms
71,228 KB
testcase_04 AC 72 ms
71,272 KB
testcase_05 AC 72 ms
71,424 KB
testcase_06 AC 71 ms
71,360 KB
testcase_07 AC 73 ms
71,396 KB
testcase_08 AC 73 ms
71,384 KB
testcase_09 AC 74 ms
71,180 KB
testcase_10 AC 70 ms
71,392 KB
testcase_11 AC 71 ms
71,212 KB
testcase_12 AC 71 ms
71,304 KB
testcase_13 AC 71 ms
71,304 KB
testcase_14 AC 71 ms
71,304 KB
testcase_15 AC 71 ms
70,956 KB
testcase_16 AC 71 ms
71,488 KB
testcase_17 AC 71 ms
71,228 KB
testcase_18 AC 73 ms
71,356 KB
testcase_19 AC 71 ms
71,232 KB
testcase_20 AC 75 ms
75,680 KB
testcase_21 AC 73 ms
71,148 KB
testcase_22 AC 73 ms
71,276 KB
testcase_23 AC 75 ms
75,836 KB
testcase_24 AC 74 ms
75,856 KB
testcase_25 AC 75 ms
75,444 KB
testcase_26 AC 74 ms
75,968 KB
testcase_27 AC 74 ms
75,680 KB
testcase_28 AC 75 ms
75,856 KB
testcase_29 AC 73 ms
75,700 KB
testcase_30 AC 75 ms
75,720 KB
testcase_31 AC 74 ms
75,748 KB
testcase_32 AC 78 ms
75,684 KB
testcase_33 AC 78 ms
75,764 KB
testcase_34 AC 76 ms
75,720 KB
testcase_35 AC 83 ms
75,768 KB
testcase_36 AC 80 ms
75,444 KB
testcase_37 AC 81 ms
75,772 KB
testcase_38 AC 92 ms
75,740 KB
testcase_39 AC 82 ms
75,908 KB
testcase_40 AC 78 ms
75,816 KB
testcase_41 AC 77 ms
75,588 KB
testcase_42 AC 71 ms
71,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())

n -= k
f = 1
ans = 0
while f * f <= n:
    if n % f == 0:
        if (n + k) % f == k:
            ans += 1
        if n // f != f:
            if (n + k) % (n // f) == k:
                ans += 1
    f += 1
print(ans)
0