#CCBCHBA0000007. Đếm ngược n về 0 (Countdown to Zero)
Đếm ngược n về 0 (Countdown to Zero)
Countdown to Zero
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Print n,n-1,...,0 in decreasing order. Zero is always included, including when n=0.
Input
One integer n.
Output
One line of space-separated integers.
Subtasks
- Subtask 1 (20%): .
- Subtask 2 (30%): .
- Subtask 3 (50%): .
Examples
Example 1
Input
3
Output
3 2 1 0
Explanation
Start at 3 and subtract one down to zero.
Example 2
Input
0
Output
0
Explanation
The loop executes once when i=0.