Run ID:64170
提交时间:2024-01-20 17:44:38
#include<bits/stdc++.h> using namespace std; int main(){ long long x,y; cin>>x; double a[x][x]; for(int i=0;i<x;i++){ for(int j=0;j<x;j++){ cin>>a[i][j]; } } int max=0; for(int i=0;i<x;i++){ for(int j=0;j<x;j++){ if(i==j||i+j==x-1){ max+=a[i][j]; } } } cout<<max; return 0; }