Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
127931 包老师 数组转置 C++ Accepted 1 MS 276 KB 474 2025-07-30 12:58:46

Tests(1/1):


Code:

#include<bits/stdc++.h> using namespace std; int main() { //只需要按照求数组总和的方式 int a[3][3]; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { cin >> a[i][j]; } } cout<<a[0][0]<<" "; cout<<a[1][0]<<" "; cout<<a[2][0]<<" "; cout<<endl; cout<<a[0][1]<<" "; cout<<a[1][1]<<" "; cout<<a[2][1]<<" "; cout<<endl; cout<<a[0][2]<<" "; cout<<a[1][2]<<" "; cout<<a[2][2]<<" "; cout<<endl; return 0; }