提交时间:2024-02-20 18:00:34

运行 ID: 41347

#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int j[n],ji=0; for(int i=0;i<n;i++){ int temp; cin>>temp; if(temp%2)j[ji++]=temp; } sort(j,j+ji); for(int i=0;i<ji;i++){ if(i==ji-1)cout<<j[i]; else cout<<j[i]<<','; } return 0; }