結果

問題 No.106 素数が嫌い!2
ユーザー nebukuro09nebukuro09
提出日時 2016-10-26 09:47:06
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 258 bytes
コンパイル時間 36 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 27,264 KB
最終ジャッジ日時 2024-05-03 06:06:46
合計ジャッジ時間 5,924 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 9 ms
6,144 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 752 ms
22,144 KB
testcase_07 AC 715 ms
22,016 KB
testcase_08 WA -
testcase_09 AC 55 ms
7,296 KB
testcase_10 AC 720 ms
22,144 KB
testcase_11 AC 300 ms
13,184 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 9 ms
6,272 KB
testcase_15 AC 10 ms
6,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

N, K = map(int, raw_input().split())
table = [0 for i in xrange(N+1)]

for i in xrange(2, int(math.sqrt(N))+1):
    if table[i] > 0:
        continue
    for j in xrange(i, N+1, i):
        table[j] += 1

print len([t for t in table if t >= K])
0