C. 小鱼的数字游戏

    远端评测题 1000ms 125MiB

小鱼的数字游戏

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Description

Xiao Yu was recently asked to take part in a number game: it needs to remember a sequence of numbers aia_i (with arbitrary length, ending with 00), then recite them in reverse order (do not recite the terminating 00). This is really too hard for Xiao Yu's limited memory—you know, its whole head isn't that big, and part of it is delicious meat! So please help Xiao Yu by writing a program to solve this problem.

Input Format

A single line containing a sequence of integers, ending with 00, separated by spaces.

Output Format

Output this sequence in reverse on a single line, separated by spaces.

3 65 23 5 34 1 30 0
30 1 34 5 23 65 3

Hint

Constraints

For 100%100\% of the testdata, it is guaranteed that 0ai23110 \leq a_i \leq 2^{31} - 1, and the number of integers does not exceed 100100.

Translated by ChatGPT 5

基础班数组考试

未参加
状态
已结束
规则
IOI
题目
6
开始于
2026-4-25 9:00
结束于
2026-4-25 11:30
持续时间
2.5 小时
主持人
参赛人数
54