For practice 1
This practice problem will require you to programme basic for loops.
You are teaching a new born baby to count to N.
You will demonstrate how to count from 1 to N, then say
Let's do it backwards! and count from N to 1.
For C++ users: WARNING: if you use iostream, your submission will TLE (exceed time limit). This is because iostream is generally slower than cstdio.
Input Specification
The input contains a single line with a single integer N
(\(1 < N < 1000000\)).
Output Specification
First output the count in ascending order, with each line containing a single integer.
Then, you should output in a single line Let's do it backwards!, then start a
new sequence of lines counting from N to 1.
Sample Input
5
Sample Output
1
2
3
4
5
Let's do it backwards!
5
4
3
2
1
Comments