Squares (4) P35080


Statement
 

pdf   zip

html

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

Input

Input consists of a natural number between 1 and 9.

Output

Print n squares of size n × n, by filling them with 0, 1, …, 9, 0, etc. Separate two squares with an empty line.

Public test cases
  • Input

    3
    

    Output

    012
    345
    678
    
    012
    345
    678
    
    012
    345
    678
    
  • Input

    4
    

    Output

    0123
    4567
    8901
    2345
    
    0123
    4567
    8901
    2345
    
    0123
    4567
    8901
    2345
    
    0123
    4567
    8901
    2345
    
  • 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