2 solutions

  • 0
    @ 2024-11-10 11:27:56
    #include<bits/stdc++.h>
    using namespace std;
    const int N=10010;
    int a[N];
    int main()
    {
        int n;
        cin>>n;
        for(int i=1;i<=n;i++)
        {
            cin>>a[i];
        }
        a[n+1]=a[1];
        for(int i=2;i<=n+1;i++)
        {
            cout<<a[i]<<" ";
        }
        return 0;
    }
    
    
    

    Information

    ID
    57
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    101
    Accepted
    48
    Uploaded By