Top to bottom P59875


Statement
 

pdf   zip

html

Write a program that reads two numbers x and y, and prints all numbers between x and y (or between y and x), in decreasing order.

Input

Input consists of two integer numbers x and y.

Output

Print all integer numbers between x and y (or between y and x), in decreasing order.

Public test cases
  • Input

    3 7
    

    Output

    7
    6
    5
    4
    3
    
  • Input

    5 -3
    

    Output

    5
    4
    3
    2
    1
    0
    -1
    -2
    -3
    
  • Input

    -7 -7
    

    Output

    -7
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++ Java Python
    User solutions
    C C++ Java PHP Python Rust