Problem
Input format
The first line contains `N`. The second line contains the `N` values separated by spaces. If `N` is `0`, the second line may be absent. - `0 <= N <= 1000`; - values are integers, `0 <= val <= 1_000_000`.
Output format
The program prints on a single line either the stack elements (from top to bottom) separated by single spaces, or the word `VIDA`.
Example
7 3 1 4 1 5 9 3
9 5 4 1 3
Stuck?
Use the Get Hint button in the action bar to reveal a guided hint.
💬 Discussion
Loading...No comments yet. Be the first to start the discussion!
Sample cases (from the problem)
Sample Case 1
7 3 1 4 1 5 9 3
9 5 4 1 3
Solve it your way first
Community solutions unlock after you submit a passing solution. Don't peek.
Ready to solve this challenge?
Create a free account to write code, submit solutions, and track your progress.