import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Main p = new Main(); } public Main() { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); System.out.println(solve(n, k)); } public int solve(int n, int k) { if(n>2000000 || n<2){ System.out.println("wrong input"); System.exit(1); } if(k>100 || k<1){ System.out.println("wrong input"); System.exit(1); } int[] sieve = new int[n+1]; Arrays.fill(sieve, Integer.MAX_VALUE); for(int i=2;i 1){ int j = sieve[cur]; while(cur%j==0) cur /= j; count++; } if(count>=k) res++; // System.out.println(String.format("%6d : %3d", i, count)); } return res; } }