输入一个 n 行 m 列的矩阵 A ,输出它的转置 AT 。
第一行包含两个整数 n 和 m ,表示矩阵 A 的行数和列数(1≤n≤100,1≤m≤100)。
接下来 n 行,每行 m 个整数,表示矩阵 A 的元素。相邻两个整数之间用单个空格隔开,每个元素均在 1到1000 之间。
m 行,每行 n 个整数,为矩阵 A 的转置。相邻两个整数之间用单个空格隔开。
3 3
1 2 3
4 5 6
7 8 9
1 4 7
2 5 8
3 6 9
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.