Run ID:7780

提交时间:2025-05-18 10:57:31

#include<bits/stdc++.h> using namespace std; int main(){ bool a[100]; for(int i=1;i<=100;i++){ a[i]=1; } for(int i=2;i<=100;i++){ for(int j=1;j<=100;j++){ if(j%i==0){ if(a[j]==1){ a[j]=0; } else{ a[j]=1; } } } } for(int i=1;i<=100;i++){ if(a[i]==1){ cout<<i<<" "; } } return 0; }