Top to bottom P59875


Statement
 

pdf   zip

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

Input

Input consists of two integer numbers xx and yy.

Output

Print all integer numbers between xx and yy (or between yy and xx), 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++ Haskell Java JavaScript PHP Python Rust Zig