Rectangles (2) X59091


Statement
 

pdf   zip

html

Write a program that prints n× m rectangles. Print each rectangle in an independent way, fill it up with 9, followed by 8, …followed by 0, etc.

Input

The input consists of several pairs of natural numbers.

Output

For every pair (n,m), print a rectangle of size n × m filled with 9,8,…0, 9, …. Separate two rectangles with an empty line.

Public test cases
  • Input

    3 3
    2 5
    6 4
    

    Output

    987
    654
    321
    
    98765
    43210
    
    9876
    5432
    1098
    7654
    3210
    9876
    
  • Input

    
            
                                

    Output

    
            
                                
  • Input

    5 5
    7 5
    5 7

    Output

    98765
    43210
    98765
    43210
    98765
    
    98765
    43210
    98765
    43210
    98765
    43210
    98765
    
    9876543
    2109876
    5432109
    8765432
    1098765
    
  • Information
    Author
    Maria Serna
    Language
    English
    Translator
    Maria Serna
    Original language
    Catalan
    Other languages
    Catalan Spanish
    Official solutions
    Unknown.
    User solutions
    C C++ Java Python