結果
| 問題 | No.106 素数が嫌い!2 |
| コンテスト | |
| ユーザー |
Tawara
|
| 提出日時 | 2015-09-15 18:11:16 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 288 bytes |
| 記録 | |
| コンパイル時間 | 121 ms |
| コンパイル使用メモリ | 77,644 KB |
| 最終ジャッジ日時 | 2025-12-03 16:57:04 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 WA * 5 |
ソースコード
import math N,K = map(int,raw_input().split()) fn = [1]*(N+1) fn[0] = fn[1] = 0 is_p = [True]*(N+1) for f in xrange(2,int(math.sqrt(N))+1): if not is_p[f]:continue d = f*2 while d <= N: if is_p[d]: is_p[d] = False else: fn[d] += 1 d += f print len(filter(lambda x:x>=K,fn))
Tawara