Help me in solving PPSCPP171 problem

My issue

I am unable to understand the problem

My code

#include <iostream>
using namespace std;

int main() {
    int N; 
    cin >> N;

    int A[N + 2];
    for(int i = 0; i < N; i++) {
        cin >> A[i];
    }

    int X; 
    cin >> X;

    for(int i = N; i >= 1; i--) {
        A[i] = A[i - 1];
    }

    A[0] = X;
    A[N + 1] = X;

    for(int i = 0; i < N + 2; i++) {
        cout << A[i] << " ";
    }

    return 0;
}   

Learning course: Complete C++ course
Problem Link: CodeChef: Practical coding for everyone

@rr2731
u need to print x at the beginning and at the end of the array.
refer my code for better understanding

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int n;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
    }
    int x;
    cin>>x;
    cout<<x<<" ";
    for(int i=0;i<n;i++)
    {
        cout<<a[i]<<" ";
    }
    cout<<x;
	return 0;
}