Rectangles (1) X26853


Statement
 

pdf   zip

Write a program that prints rectangles with n×mn\times m values (n+m)mod5(n+m)\mod 5’s.

Input

Input consists of several pairs of natural numbers.

Output

For every pair (n,m)(n,m), print a rectangle of size n×mn \times m full of (n+m)mod5(n+m)\mod 5’s. Separate two rectangles with an empty line.

Public test cases
  • Input

    3 3
    2 5
    6 4
    

    Output

    111
    111
    111
    
    22222
    22222
    
    0000
    0000
    0000
    0000
    0000
    0000
    
  • Input

    
            
                                

    Output

    
            
                                
  • Input

    5 5
    7 5
    5 7

    Output

    00000
    00000
    00000
    00000
    00000
    
    22222
    22222
    22222
    22222
    22222
    22222
    22222
    
    2222222
    2222222
    2222222
    2222222
    2222222
    
  • Information
    Author
    Maria Serna
    Language
    English
    Translator
    Maria Serna
    Original language
    Catalan
    Other languages
    Catalan Spanish
    Official solutions
    Unknown.
    User solutions
    C++