Submit | All submissions | Best solutions | Back to list |
FUCT_FOR_TRINUM - Number triangular |
Enter any positive integer that describes the height of number triangular. Print out the number triangular.
Example
The number triangular that has 5 rows is:
1 2 1 3 2 1 4 3 2 1 5 4 3 2 1
Input
Contain the height of number triangular.
Constraints
- 0 < n ≤ 1 00
Output
Print out the number triangular.
Example
Input 1: 5 Output 1: 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1
Input 2: 2 Output 2: 1 2 1
Added by: | khanhvh |
Date: | 2018-07-10 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |
Resource: | FPTU Can Tho |