Squares (2) P34080


Statement
 

pdf   zip

thehtml

Write a program that prints squares n × n. Draw each square independently, and start filling it with 0, 1, …, 9, 0, etc.

Input

Input consists of several natural numbers between 1 and 9.

Output

For every n, print a square of size n × n, by filling it with 0, 1, …, 9, 0, etc. Separate two squares with an empty line.

Public test cases
  • Input

    3
    1
    6
    

    Output

    012
    345
    678
    
    0
    
    012345
    678901
    234567
    890123
    456789
    012345
    
  • Input

    
            
                                

    Output

    
            
                                
  • Input

    5
    

    Output

    01234
    56789
    01234
    56789
    01234
    
  • 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 Python