#C14658. Matrix Generation

    ID: 44331 Type: Default 1000ms 256MiB

Matrix Generation

Matrix Generation

Given two integers m and n, generate an m x n matrix A where each element is defined by \(A[i][j] = i + j\) for all valid indices \(0 \leq i < m\) and \(0 \leq j < n\). The rows and columns are 0-indexed.

The output should display the matrix with each row on a new line and the elements of each row separated by a single space.

inputFormat

The input consists of a single line containing two space-separated integers \(m\) and \(n\), where \(m\) is the number of rows and \(n\) is the number of columns.

outputFormat

Output the generated matrix in \(m\) lines. Each line must contain \(n\) space-separated integers corresponding to the elements of that row.

## sample
3 4
0 1 2 3

1 2 3 4 2 3 4 5

</p>