eolymp
bolt
Try our new interface for solving problems
Problems

Shift the elements to the right

Shift the elements to the right

The linear array of $n$ integers is given. Shift its elements cyclically one position to the right. \InputFile The number of elements $n\;(n \le 100)$ in array is given in the first line. The second line contains $n$ elements of array, each of them does not exceed $100$ by absolute value. \OutputFile Print $n$ numbers in one line --- the new array elements.
Time limit 1 second
Memory limit 128 MiB
Input example #1
4
1 2 3 4
Output example #1
4 1 2 3
Source SFE-2010 Variant 22