1 solutions

  • 0
    @ 2025-7-12 16:20:53

    #include <bits/stdc++.h> using namespace std;

    int main() { int a[1000], n, x, v = 0, j; cin >> n; for (int i = 0; i < n; i++) { cin >> x; if (x % 2 == 1) a[v++] = x; } sort(a, a + v); for (int j = 0; j < v; j++) { cout << a[j] ; if (j != v - 1) cout << ","; }

    return 0;
    

    }

    • 1

    Information

    ID
    356
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    4
    Tags
    # Submissions
    50
    Accepted
    24
    Uploaded By