#T737. 数组逆序重存放

数组逆序重存放

Description

Reverse the order of values in an array. For example, if the original order is 8, 6, 5, 4, 1, it should be changed to 1, 4, 5, 6, 8.

Input Format

The input consists of two lines:

  • The first line contains the number of elements in the array, n (1 < n < 100).
  • The second line contains n integers separated by spaces.

Output Format

The output is a single line: the integers of the reversed array, separated by spaces.

5
8 6 5 4 1
1 4 5 6 8

翻译结果

CodesOnline

(注:这是一个专有名词/品牌名称,通常保持原样不翻译。如果上下文需要解释,可以补充说明其含义,例如:"CodesOnline(代码在线平台)"。但在仅作为名称出现时,建议保留英文原形式。)

保留Markdown格式说明:
由于原文仅包含标题格式的专有名词,翻译结果同样以二级标题形式呈现,未添加额外格式。若后续内容涉及代码块或复杂格式,将严格保留原结构。