結果

問題 No.106 素数が嫌い!2
ユーザー ああいいああいい
提出日時 2022-01-28 16:04:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 142 ms / 5,000 ms
コード長 236 bytes
コンパイル時間 363 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 92,308 KB
最終ジャッジ日時 2023-08-28 13:15:11
合計ジャッジ時間 3,480 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
84,028 KB
testcase_01 AC 70 ms
71,072 KB
testcase_02 AC 70 ms
71,296 KB
testcase_03 AC 70 ms
71,296 KB
testcase_04 AC 104 ms
84,412 KB
testcase_05 AC 136 ms
92,308 KB
testcase_06 AC 132 ms
92,084 KB
testcase_07 AC 134 ms
92,084 KB
testcase_08 AC 82 ms
77,440 KB
testcase_09 AC 82 ms
77,268 KB
testcase_10 AC 131 ms
92,068 KB
testcase_11 AC 99 ms
83,032 KB
testcase_12 AC 142 ms
91,188 KB
testcase_13 AC 70 ms
71,300 KB
testcase_14 AC 69 ms
71,324 KB
testcase_15 AC 73 ms
75,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

dat = [0] * (N + 1)
C = N + 1
for i in range(2,C):
    if dat[i] == 0:
        for j in range(i,C,i):
            dat[j] += 1
ans = 0
for i in range(2,N+1):
    if dat[i] >= K:
        ans += 1
print(ans)
0