結果

問題 No.2417 Div Count
ユーザー watayuwatayu
提出日時 2023-08-12 14:44:07
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 369 bytes
コンパイル時間 411 ms
コンパイル使用メモリ 82,296 KB
実行使用メモリ 68,076 KB
最終ジャッジ日時 2024-04-30 07:03:22
合計ジャッジ時間 7,134 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
60,140 KB
testcase_01 AC 35 ms
58,452 KB
testcase_02 RE -
testcase_03 AC 34 ms
52,708 KB
testcase_04 AC 33 ms
52,684 KB
testcase_05 AC 31 ms
52,740 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 34 ms
57,468 KB
testcase_12 AC 35 ms
57,868 KB
testcase_13 AC 36 ms
57,860 KB
testcase_14 AC 36 ms
59,192 KB
testcase_15 RE -
testcase_16 AC 35 ms
58,316 KB
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 67 ms
58,060 KB
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 55 ms
57,124 KB
testcase_24 RE -
testcase_25 AC 76 ms
59,080 KB
testcase_26 AC 1,136 ms
57,928 KB
testcase_27 TLE -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int, input().split())
ans = 0
def divisors(num):
    divisors = [1]
    if  num == 1:
        return divisors
    for i in range(2, num//2+1):
        if num % i == 0:
            divisors.append(i)
    divisors.append(num)
    return divisors
ans = divisors(n-k)
for i in range(len(ans)):
    if ans[i] >= k:
        pos = i
        break
print(len(ans)-pos)
0