LearnPy Hub
← Loops problems
Medium

Number Square Pattern

Read n. Print an n × n grid where the number in row i, column j (from 1) is i * j, each number right-aligned in width 4.

Input

One integer n ≥ 1.

Output

n lines.

Sample 1

Input
3
Output
   1   2   3
   2   4   6
   3   6   9

Sample 2

Input
1
Output
   1
solution.py
Output appears here
Number Square Pattern · Python practice problem · LearnPy Hub