样例是对的呀????
查看原帖
样例是对的呀????
767417
Serendi_Pity楼主2022/10/5 16:58
#include<bits/stdc++.h>
using namespace std;
int main(){
    int a[105][105],b[105][105],c,d;
    cin>>c>>d;
    for(int i=1;i<=c;i++){
        for(int j=1;j<=d;j++){
            cin>>a[i][j];
            b[j][i]=a[i][j];
        }
    }
    for(int i=1;i<=c;i++){
        for(int j=1;j<=d;j++){
            cout<<b[i][j]<<" ";
        }
        cout<<endl;
    }
}
2022/10/5 16:58
加载中...