Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
64175 周梓易 对角线之和 C++ Accepted 2 MS 268 KB 339 2024-01-20 17:50:43

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; long long a[10][10]; int main(){ int n,min=0; cin>>n; double a[n][n]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>a[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(i==j||i+j==n-1){ min+=a[i][j]; } } } cout<<min; return 0; }