結果

問題 No.106 素数が嫌い!2
ユーザー etale.K3etale.K3
提出日時 2021-08-08 17:55:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,339 ms / 5,000 ms
コード長 177 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 11,820 KB
実行使用メモリ 25,644 KB
最終ジャッジ日時 2023-10-19 18:17:45
合計ジャッジ時間 10,412 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 644 ms
17,744 KB
testcase_01 AC 29 ms
10,156 KB
testcase_02 AC 29 ms
10,156 KB
testcase_03 AC 29 ms
10,156 KB
testcase_04 AC 642 ms
17,744 KB
testcase_05 AC 1,293 ms
25,644 KB
testcase_06 AC 1,307 ms
25,644 KB
testcase_07 AC 1,339 ms
25,644 KB
testcase_08 AC 100 ms
11,072 KB
testcase_09 AC 105 ms
11,072 KB
testcase_10 AC 1,290 ms
25,644 KB
testcase_11 AC 574 ms
16,940 KB
testcase_12 AC 1,251 ms
25,116 KB
testcase_13 AC 28 ms
10,156 KB
testcase_14 AC 28 ms
10,156 KB
testcase_15 AC 29 ms
10,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

P = [0]*(N+1)

for n in range(2, N+1):
    if P[n] < 1:
        for i in range(n, N+1, n):
            P[i] += 1

print(sum(p >= K for p in P))
0