結果

問題 No.106 素数が嫌い!2
ユーザー 河野竜也河野竜也
提出日時 2021-08-25 21:59:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,560 ms / 5,000 ms
コード長 185 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 26,308 KB
最終ジャッジ日時 2024-04-28 13:25:57
合計ジャッジ時間 11,865 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 783 ms
18,344 KB
testcase_01 AC 26 ms
10,752 KB
testcase_02 AC 27 ms
10,368 KB
testcase_03 AC 26 ms
10,624 KB
testcase_04 AC 739 ms
18,212 KB
testcase_05 AC 1,510 ms
26,220 KB
testcase_06 AC 1,531 ms
26,200 KB
testcase_07 AC 1,508 ms
26,308 KB
testcase_08 AC 126 ms
11,520 KB
testcase_09 AC 119 ms
11,648 KB
testcase_10 AC 1,473 ms
26,224 KB
testcase_11 AC 607 ms
17,528 KB
testcase_12 AC 1,560 ms
25,608 KB
testcase_13 AC 31 ms
10,624 KB
testcase_14 AC 28 ms
10,752 KB
testcase_15 AC 28 ms
10,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
d=[0]*(n+1)
for i in range(2,n+1):
  if d[i]==0:
    for j in range(i,n+1,i):
      d[j]+=1
ans=0
for i in range(2,n+1):
  if d[i]>=k:
    ans+=1
print(ans)
0