-->
当前位置:首页 > 题库

PROGRAMMING:Matrix of linear algebra

Luz5年前 (2021-05-10)题库469
Jiajia is the vice president of our ACM club. She feels that she has no sense of existence
Linear algebra is a required course next semester.
There is a concept called matrix in online generation, a two-dimensional data table, which has many applications in image processing. One day, Jiajia got the gray matrix of a picture (n order), that is, the matrix has n rows, n elements in each row. Now he wants to transpose the gray matrix of this picture. Can you complete this task for Jiajia?
(transpose: if the matrix is a, then its transpose is at, satisfying: a [i] [J] = = at [J] [i], 1 < = I, J < = n)
###Input format:
Multiple sets of data. Input n (1 < = n < = 100) in the first line of each group of data, representing the order of gray matrix.
Next, there are n rows. Each row has n numbers. The range of each number is: [0255].
###Output format:
For each group of data output transposed matrix, n rows, n numbers in each row, separated by a space.
(don't output extra spaces)
###Input example:
Here is a set of inputs. For example:
```in
two
1 2
3 4
three
1 2 1
1 2 1
1 2 1
```
###Output example:
The corresponding output is given here. For example:
```out
1 3
2 4
1 1 1
2 2 2
1 1 1
```







answer:If there is no answer, please comment