Range

Given two numbers a and b, you are asked to print all the integers between those two numbers (a and b included).
The input consists of two positive integers a and b. The output should contain all the numbers in between those two starting from a and ending with b, each on a separate line.
Input
Output
2 5
2 3 4 5
5 2
5 4 3 2
 

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue