102810: [AtCoder]ABC281 A - Count Down

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:1 Solved:0

Description

Score : $100$ points

Problem Statement

Print all non-negative integers less than or equal to $N$ in descending order.

Constraints

  • $1 \leq N \leq 100$
  • $N$ is an integer.

Input

The input is given from Standard Input in the following format:

$N$

Output

Print $X$ lines, where $X$ is the number of non-negative integers less than or equal to $N$.
For each $i=1, 2, \ldots, X$, the $i$-th line should contain the $i$-th greatest non-negative integer less than or equal to $N$.


Sample Input 1

3

Sample Output 1

3
2
1
0

We have four non-negative integers less than or equal to $3$, which are $0$, $1$, $2$, and $3$.
To print them in descending order, print $3$ in the first line, $2$ in the second, $1$ in the third, and $0$ in the fourth.


Sample Input 2

22

Sample Output 2

22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0

Input

题意翻译

给出一个正整数 $N$,要求倒序输出 $0$ 到 $N$。

Output

得分:100分

问题描述

按照降序打印出不大于N的所有非负整数。

限制条件

  • $1 \leq N \leq 100$
  • $N$ 是一个整数。

输入

输入从标准输入按以下格式给出:

$N$

输出

打印出$X$行,其中$X$是不大于$N$的非负整数的数量。
对于每个$i=1, 2, \ldots, X$,第$i$行应该包含第$i$大的不大于$N$的非负整数。


样例输入1

3

样例输出1

3
2
1
0

我们有四个不大于$3$的非负整数,它们分别是$0$,$1$,$2$和$3$。
为了按照降序打印,我们在第一行打印$3$,在第二行打印$2$,在第三行打印$1$,在第四行打印$0$。


样例输入2

22

样例输出2

22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0

加入题单

上一题 下一题 算法标签: