Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
323093 钟宜辰 【C4-9】方阵对角线 C++ 解答错误 0 1 MS 252 KB 293 2025-05-17 17:05:58

Tests(0/2):


#include<bits/stdc++.h> using namespace std; int main(){ int a[40][40],n,b[40],s=0; cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ cin>>a[i][j]; if(i+j==n+1){ s++; b[s]=a[i][j]; } } } for(int i=1;i<=s;i++){ cout<<b[i]<<endl; } return 0; }


测评信息: