2d Arrays Demo

easy
1. You are given a number n, representing the number of rows.
2. You are given a number m, representing the number of columns.
3. You are given n*m numbers, representing elements of 2d array a.
4. You are required to display the contents of 2d array as suggested by output format below.

Input Format

A number n A number m e11 e12.. e21 e22.. .. n * m number of elements

Output Format

e11 e12 e13 .. e21 e22 e23 ..

Constraints

1 <= n <= 10^2
1 <= m <= 10^2
-10^9 <= e1, e2, .. n * m elements <= 10^9

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
2
4
11
12
13
14
21
22
23
24
Output
11 12 13 14
21 22 23 24
Next
Matrix Multiplication

Related Questions