void gen_primelist(vector& out, ll high) { out.resize(high + 1); out[0] = out[1] = 1; ll sqh = (ll)sqrt(high); for (ll i = 2; i <= sqh; i++) { if (out[i] == 0) { for (ll j = i; j <= high; j += i) { // i*i out[j] += 1; } } } } { ll N,K;rd(N,K); vector p; gen_primelist(p,N); ll cnt=0; REP(i,N+1) cnt+=p[i]>=K; wt(cnt); }