結果
問題 |
No.106 素数が嫌い!2
|
ユーザー |
![]() |
提出日時 | 2025-08-02 00:01:07 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 131 ms / 5,000 ms |
コード長 | 378 bytes |
コンパイル時間 | 189 ms |
コンパイル使用メモリ | 82,180 KB |
実行使用メモリ | 95,672 KB |
最終ジャッジ日時 | 2025-08-02 00:01:15 |
合計ジャッジ時間 | 1,943 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
N, K = map(int, input().split()) distinct_prime_factor_count = [0]*(N + 1) primes = [] for i in range(2, N + 1): if distinct_prime_factor_count[i] == 0: primes.append(i) for num in range(i, N + 1, i): distinct_prime_factor_count[num] += 1 ans = 0 for i in range(2, N + 1): if distinct_prime_factor_count[i] >= K: ans += 1 print(ans)