题解
2024-12-08 21:57:25
发布于:广东
16阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int a,b[101],c=0;
int main(){
cin>>a;
for(int i=1;i<=a;i++) cin>>b[i];
for(int i=1;i<=a;i++) if(b[i]%2) cout<<' '<<b[i];
cout<<endl;
for(int i=1;i<=a;i++) if(b[i]%2==0) cout<<' '<<b[i];
return 0;
}
这里空空如也
有帮助,赞一个