创想实验室
我们都是梦想家

Reverse

描述

In this problem, you are required to write a program that reads n integers from the input and output those integers in the reverse order of the input.

输入

The  first line of the input contains a single integer n (1 ≤ n ≤ 10), the number of integers.

The second line contains n space-separated integers that your program needs to process, it is guaranteed that each integer is non-negative and does not exceed 100.

输出

Output the integers in the input in reverse order, in a single line, separated by a single space. Please do NOT output any spaces at the end of the line (i.e. after the last integer), otherwise your program may receive the Presentation Error verdict.

样例输入

样例输出

题解

数组逆序,先储存后逆序输出就可以

代码

 

 

网站所发布的代码已提交通过,代码可能经过修改防止抄袭,未经允许不得转载:创想实验室 » Reverse
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址