#C14005. Matrix Transposition
Matrix Transposition
Matrix Transposition
Given a two-dimensional matrix ( A ) with dimensions ( m \times n ), your task is to compute its transpose ( A^T ), which is a matrix with dimensions ( n \times m ) where the element at position ( (i, j) ) in ( A^T ) is equal to the element at position ( (j, i) ) in ( A ).
The input format, output format, and sample test cases are described below. This is a standard problem that tests your ability to manipulate matrices and arrays.
inputFormat
The first line contains two space-separated integers ( m ) and ( n ), representing the number of rows and columns of the matrix respectively. This is followed by ( m ) lines, each containing ( n ) space-separated integers denoting the elements of the matrix.
outputFormat
Output the transposed matrix. Each of the ( n ) lines should contain ( m ) space-separated integers representing the transposed matrix.## sample
1 1
1
1
</p>