Problem list
Log in
#r02772 · Online Judge > GoldOJ

Print Until Zero

Bronze III 2.0 s 1024 MB

Integers are given one per line. Stop reading when $0$ appears and print, one per line, every number given before that $0$ (the $0$ is not printed). A $0$ is guaranteed to appear.

Input

Several integers, one per line, each in $[0, 1000]$; a $0$ appears at least once.

Output

Print the integers before the first $0$, one per line.

Example 1

Input
3
7
2
0
9
Output
3
7
2
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code