#K68492. Multiplication Matrix Construction
Multiplication Matrix Construction
Multiplication Matrix Construction
Given an integer \(N\) where \(1 \le N \le 20\), construct an \(N \times N\) matrix such that the element in the \(i\)-th row and \(j\)-th column is \(i \times j\). Each row of the matrix should be printed on a new line and the numbers within each row are separated by a single space.
For example, when \(N = 3\), the expected output is:
1 2 3 2 4 6 3 6 9
inputFormat
The input consists of a single integer \(N\) (\(1 \le N \le 20\)), representing the size of the matrix.
outputFormat
Output the constructed \(N \times N\) matrix with each element equal to the product of its row and column indices. Each row should be printed on a new line with the numbers separated by a single space.
## sample1
1