杜禹轩 • 3天前
#include<bits/stdc++.h>
using namespace std;
int main(){
int a[101]={0};//
for(int j=2;j<=100;j++){
for(int i=1;i<=100;i++){
if(i%j==0){
if(a[i]==0){
a[i]=1;
}else{
a[i]=0;
}
}
}
}
for(int i=1;i<=100;i++){
if(a[i]==0){
cout<<i<<" ";
}
}
return 0;
}
评论: