Run ID:2792

提交时间:2024-02-24 18:30:15

#include<iostream> using namespace std; void opposite(bool &f){ if(!f) f=1; else f=0; } int main(){ bool f[101]={0}; for(int i=1;i<=100;i++){ for(int j=i;j<=100;j+=i) opposite(f[j]); } for(int i=1;i<=100;i++) if(f[i]) cout<<i<<" "; return 0; }