結果
問題 | No.106 素数が嫌い!2 |
ユーザー |
![]() |
提出日時 | 2015-08-10 12:37:45 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 1,289 ms / 5,000 ms |
コード長 | 248 bytes |
コンパイル時間 | 86 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 21,996 KB |
最終ジャッジ日時 | 2024-07-18 06:29:03 |
合計ジャッジ時間 | 10,047 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
N, K = map(int, raw_input().strip().split()) npf = [0] * (N+1) for i in xrange(2, N+1): if npf[i] == 0: for j in xrange(i, N+1, i): npf[j] += 1 ans = 0 for i in xrange(2, N+1): if npf[i] >= K: ans += 1 print(ans)