标签:ios stream \n ++ clu lse pop std cto
#include<cstdio>
#include<iostream>
#include<vector>
using namespace std;
int main(){
int M,N,k=1,l=0;
cin>>M>>N;
vector<int>v;
for(int i=1;l<=10000;i++){
v.push_back(i);
l++;
for(int j=2;j*j<=i;j++){
if(i%j==0){
v.pop_back();
l--;
break;
}
}
}
for(int i=M;i<N;i++){
if(k%10==0){
printf("%d",v[i]);
printf("\n");
}else{
printf("%d ",v[i]);
}
k++;
}
cout<<v[N];
return 0;
}
标签:ios stream \n ++ clu lse pop std cto
原文地址:https://www.cnblogs.com/tao7/p/9766855.html