No.106 I Hate Primes! 2
Problem Statement
Honda, who hates prime numbers, does not really want to use numbers composed of few primes (numbers with few distinct prime factors).
So he has decided to use, among the numbers from $2〜N$, only those that have at least $K$ prime factors. However, since he would not like having too few usable numbers, he has decided to find out in advance how many numbers he can use.
Given $N$ and $K$, output the count of usable numbers.
Input
N K
The input is given as integers.
$2 \le N \le 2,000,000=2\times 10^6$
$1 \le K \le 100$
Output
Output the count of numbers between $2$ and $N$, inclusive, whose number of distinct prime factors is at least $K$.
Print a newline at the end.
Sample
Sample 1
Input
2 1
Output
1
Sample 2
Input
4 2
Output
0
Among 2,3,4 there is no number with 2 or more prime factors, so the answer is 0.
Sample 3
Input
1000 4
Output
23
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。