数组逆序重存放

Luogu
IDLGB2089
Time1000ms
Memory128MB
DifficultyP1
数组
将一个数组中的值按逆序重新存放。例如,原来的顺序为 $8,6,5,4,1$。要求改为 $1,4,5,6,8$。 ## Input 输入为两行:第一行数组中元素的个数 $n$($1 \lt n \le 100$),第二行是 $n$ 个整数,每两个整数之间用空格分隔。 ## Output 输出为一行:输出逆序后数组的整数,每两个整数之间用空格分隔。 [samples]
Samples
Input #1
5
8 6 5 4 1
Output #1
1 4 5 6 8
API Response (JSON)
{
  "problem": {
    "name": "数组逆序重存放",
    "description": {
      "content": "将一个数组中的值按逆序重新存放。例如,原来的顺序为 $8,6,5,4,1$。要求改为 $1,4,5,6,8$。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 131072
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB2089"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "将一个数组中的值按逆序重新存放。例如,原来的顺序为 $8,6,5,4,1$。要求改为 $1,4,5,6,8$。\n\n## Input\n\n输入为两行:第一行数组中元素的个数 $n$($1 \\lt n \\le 100$),第二行是 $n$ 个整数,每两个整数之间用空格分隔。\n\n## Output\n\n输出为一行:输出逆序后数组的整数,每两个整数之间用空格分隔。\n\n[samples]...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments