#CCBCHHAI0000005. Một lượt dù điều kiện sai (One Pass Despite a False Condition)
Một lượt dù điều kiện sai (One Pass Despite a False Condition)
One Pass Despite a False Condition
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given integer , each pass prints the current value and then decrements it. Repeat while the updated . Print all visited values on one line separated by single spaces.
Input
One line contains integer .
Output
One line containing all printed values with exactly one space between adjacent values and no trailing space.
Subtasks
- Subtask 1 (20%): .
- Subtask 2 (30%): .
- Subtask 3 (50%): .
Examples
Example 1
Input
-1
Output
-1
Explanation
Print -1 on the first pass, decrement to -2, and stop.
Example 2
Input
3
Output
3 2 1
Explanation
The loop prints 3, 2, 1; after printing 1 the value becomes zero, so zero is not printed.