結果

問題 No.106 素数が嫌い!2
ユーザー yuki2006yuki2006
提出日時 2014-12-18 23:55:33
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 176 ms / 5,000 ms
コード長 255 bytes
コンパイル時間 1,638 ms
コンパイル使用メモリ 77,448 KB
実行使用メモリ 94,496 KB
最終ジャッジ日時 2023-09-02 18:56:35
合計ジャッジ時間 4,137 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
86,592 KB
testcase_01 AC 76 ms
76,496 KB
testcase_02 AC 78 ms
76,660 KB
testcase_03 AC 77 ms
76,272 KB
testcase_04 AC 122 ms
86,568 KB
testcase_05 AC 157 ms
94,224 KB
testcase_06 AC 165 ms
94,264 KB
testcase_07 AC 158 ms
94,404 KB
testcase_08 AC 90 ms
79,876 KB
testcase_09 AC 89 ms
79,952 KB
testcase_10 AC 161 ms
94,496 KB
testcase_11 AC 113 ms
85,492 KB
testcase_12 AC 176 ms
93,700 KB
testcase_13 AC 74 ms
76,316 KB
testcase_14 AC 75 ms
76,244 KB
testcase_15 AC 78 ms
77,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

sieve = [0] * (N + 1)
for i in xrange(2, N + 1):
    if sieve[i] > 0:
        continue
    j = i
    while j <= N:
        sieve[j] += 1
        j += i

count = sum(sieve[i] >= K for i in xrange(2, N + 1))
print count
0