Delimiter

AtCoder
IDabc344_b
Time2000ms
Memory256MB
Difficulty
You are given $N$ integers $A_1,A_2,\dots,A_N$, one per line, over $N$ lines. However, **$N$ is not given in the input.** Furthermore, the following is guaranteed: * $A_i \neq 0$ ( $1 \le i \le N-1$ ) * $A_N = 0$ Print $A_N, A_{N-1},\dots,A_1$ in this order. ## Constraints * All input values are integers. * $1 \le N \le 100$ * $1 \le A_i \le 10^9$ ( $1 \le i \le N-1$ ) * $A_N = 0$ ## Input The input is given from Standard Input in the following format: $A_1$ $A_2$ $\vdots$ $A_N$ [samples]
Samples
Input #1
3
2
1
0
Output #1
0
1
2
3

Note again that $N$ is not given in the input. Here, $N=4$ and $A=(3,2,1,0)$.
Input #2
0
Output #2
0

$A=(0)$.
Input #3
123
456
789
987
654
321
0
Output #3
0
321
654
987
789
456
123
API Response (JSON)
{
  "problem": {
    "name": "Delimiter",
    "description": {
      "content": "You are given $N$ integers $A_1,A_2,\\dots,A_N$, one per line, over $N$ lines. However, **$N$ is not given in the input.**   Furthermore, the following is guaranteed: *   $A_i \\neq 0$ ( $1 \\le i \\le N",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc344_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given $N$ integers $A_1,A_2,\\dots,A_N$, one per line, over $N$ lines. However, **$N$ is not given in the input.**  \nFurthermore, the following is guaranteed:\n\n*   $A_i \\neq 0$ ( $1 \\le i \\le N...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments