結果
問題 |
No.106 素数が嫌い!2
|
ユーザー |
|
提出日時 | 2017-03-19 14:38:22 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 1,495 ms / 5,000 ms |
コード長 | 316 bytes |
コンパイル時間 | 92 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 26,360 KB |
最終ジャッジ日時 | 2024-07-04 23:35:33 |
合計ジャッジ時間 | 7,204 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
N, K = map(int, input().split()) if K == 1: print(N - 2 + 1) quit() if K >= 8: print(0) quit() dp = [0] * (N + 1) for p in range(2, N + 1): if dp[p] > 0: continue for m in range(p, N + 1, p): dp[m] += 1 ans = 0 for d in dp: if d >= K: ans += 1 print(ans)