0
已解决
宣瑞涵
高级守护
高级守护
题目链接: 酷町堂:2902
#include <iostream>
using namespace std;
int n, m, cnt,a[105],b[105];
int main(){
cin>>n>>m;
for(int i=1;i<=n;i++){
a[i]=i;
}
for(int i=1;i<=n;i++){
if(a[i]%1==0) b[i]=1;
else if(a[i]%2==0) b[i]=0;
else if(a[i]%3==0){
if(b[i]==1){
b[i]=0;
}else{
b[i]=1;
}
}else if(a[i]%4==0){
if(b[i]==1){
b[i]=0;
}else{
b[i]=1;
}
}else if(i%n==0){
if(b[i]==1){
b[i]=0;
}else{
b[i]=1;
}
break;
}
}
for(int i=1; i<=n; i++){
if(b[i]==1){
cout<<a[i]<<" ";
}
}
return 0;
}