| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 64153 | 段文昊 | 对角线之和 | C++ | Compile Error | 0 MS | 0 KB | 309 | 2024-01-20 17:37:41 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,b=0; cin>>n; int 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){ b+=a[i][j]; } } } cout<<b; return 0; }
Main.cc: In function 'int main()':
Main.cc:14:18: error: lvalue required as left operand of assignment
if(i==j || i+j=n-1){
^