#CCBCHBA0000001. Bảng số từ 1 đến n (Numbers from 1 to N)
Bảng số từ 1 đến n (Numbers from 1 to N)
Numbers from 1 to N
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given a nonnegative integer n, print 1 through n in increasing order. If n=0, print only an empty line.
Input
One integer n.
Output
One line with numbers separated by single spaces, without trailing spaces.
Subtasks
- Subtask 1 (20%): .
- Subtask 2 (30%): .
- Subtask 3 (50%): .
Examples
Example 1
Input
4
Output
1 2 3 4
Explanation
The loop visits i=1,2,3,4 and stops at i=5.
Example 2
Input
0
Output
Explanation
The loop is skipped and only a newline is printed.