C. 数组逆序重存放

    Type: RemoteJudge 1000ms 128MiB

数组逆序重存放

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

将一个数组中的值按逆序重新存放。例如,原来的顺序为 8,6,5,4,18,6,5,4,1。要求改为 1,4,5,6,81,4,5,6,8

输入格式

输入为两行:第一行数组中元素的个数 nn1<n1001 \lt n \le 100),第二行是 nn 个整数,每两个整数之间用空格分隔。

输出格式

输出为一行:输出逆序后数组的整数,每两个整数之间用空格分隔。

5
8 6 5 4 1
1 4 5 6 8

暑假C三

Not Attended
Status
Done
Rule
IOI
Problem
5
Start at
2025-7-20 14:45
End at
2025-7-20 16:45
Duration
2 hour(s)
Host
Partic.
9