Output array 6#8958

Output array 6

1 segundo
64 megabytes
Muy fácil

The program should read an array of integers from the console and print only the elements located at odd indices, maintaining their original order. These elements should be displayed on a single line, separated by spaces. Note that the index numbering begins at .

Entrada

The first line contains the integer (1 \le n \le 100), representing the number of elements in the array. The second line contains integers, each separated by a space, with each integer having an absolute value not exceeding .

Salida

On the first line, output the count of elements in the array that have odd indices. On the second line, print these elements separated by a space. If there are no elements with odd indices, output the message NO.

Ejemplos

Ejemplo 1

Loading
Loading