結果

問題 No.106 素数が嫌い!2
ユーザー matriematrie
提出日時 2020-12-23 09:08:07
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 1,752 ms / 5,000 ms
コード長 141 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 11,876 KB
実行使用メモリ 25,580 KB
最終ジャッジ日時 2023-10-21 15:02:55
合計ジャッジ時間 13,187 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 819 ms
17,680 KB
testcase_01 AC 23 ms
10,092 KB
testcase_02 AC 24 ms
10,092 KB
testcase_03 AC 24 ms
10,092 KB
testcase_04 AC 796 ms
17,680 KB
testcase_05 AC 1,752 ms
25,580 KB
testcase_06 AC 1,716 ms
25,580 KB
testcase_07 AC 1,718 ms
25,580 KB
testcase_08 AC 117 ms
11,008 KB
testcase_09 AC 123 ms
11,008 KB
testcase_10 AC 1,639 ms
25,580 KB
testcase_11 AC 732 ms
16,876 KB
testcase_12 AC 1,571 ms
25,052 KB
testcase_13 AC 25 ms
10,092 KB
testcase_14 AC 22 ms
10,092 KB
testcase_15 AC 24 ms
10,092 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
p=[0]*n
for i in range(2,n+1):
	if p[i-1]<1:
		t=i-1
		while t<n:
			p[t]+=1
			t+=i
print(sum(x>=k for x in p))
0