結果
問題 | No.106 素数が嫌い!2 |
ユーザー |
|
提出日時 | 2024-09-24 09:11:19 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 406 bytes |
コンパイル時間 | 147 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 24,504 KB |
最終ジャッジ日時 | 2024-09-24 09:11:31 |
合計ジャッジ時間 | 12,640 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | TLE * 1 -- * 12 |
ソースコード
def primes(n):ans = set()while n %2 == 0:ans.add(2)n //= 2f = 3while f * f <= n:if n %f == 0:ans.add(f)n //= felse:f += 2if n != 1:ans.add(n)return ansn, k = map(int, input().split())cnt = 0for i in range(2, n+1):a = len(primes(i))if a >= k:cnt += 1print(cnt)