Write first-last and so on elements

Given a sequence of integers x₀, …, x_(n − 1), write again these n
elements to the output in the following order:
x₀, x_(n − 1), x₁, x_(n − 2), x₂, x_(n − 3), ….

Exam score: 2.5 Automatic part: 100%

Input

The input has several cases, each one described in a diferent line. Each
case starts with a natural number n ≥ 1 followed by n integers
x₀, …, x_(n − 1).

Output

Write the corresponding answer for each case in a different line,
separating the elements of each sequence with blank spaces.

Problem information

Author: Professorat de PRO1

Generation: 2026-01-25T22:44:55.824Z

© Jutge.org, 2006–2026.
https://jutge.org
