/* MLE 探索かな */ #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const ll INF=1LL<<60; typedef pair P; typedef pair PP; const ll MOD=998244353; const double PI=acos(-1); int main(){ int N,Q; cin>>N>>Q; vector x(Q); for(int q=0;q>x[q]; } vector num(N+1,0); queue> que; //set> st; vector> st; vector init=vector{1}; que.push(init); //num[1]++;//末尾の数字 while(!que.empty()){ vector c=que.front(); que.pop(); //st.push_back(c); int a=c.back(); for(int v:c){ num[v]++; } for(int b=2*a;b<=N;b+=a){ c.push_back(b); que.push(c); c.pop_back(); } } /* //cout<<"test"<