1 solutions

  • 0
    @ 2023-1-17 22:21:22
    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n, a[100], x;
        cin >> n; 
        for (int i=1;i<=n;i++)
            cin >> a[i];
        cin >> x;
        for (int i=1;i<=n;i++)
        {
            if (a[i] != x) cout << a[i] << " ";
        }
        cout << x;
        return 0;
    }
    
    
    • 1

    Information

    ID
    499
    Time
    1000ms
    Memory
    16MiB
    Difficulty
    10
    Tags
    # Submissions
    4
    Accepted
    4
    Uploaded By