Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
139475 | 杨博煊 | 矩阵转置 | C++ | 通过 | 100 | 0 MS | 248 KB | 321 | 2024-03-23 17:27:24 |
#include<bits/stdc++.h> using namespace std; const int N=1e2+50; int n,m,a[N][N]; int main() { cin>>n>>m; for(int i=1;i<=n;++i) { for(int j=1;j<=m;++j) { cin>>a[i][j]; } } for(int j=1;j<=m;++j) { for(int i=1;i<=n;++i) { cout<<a[i][j]<<" "; } cout<<endl; } return 0; }