Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
118396 | 马珺宇 | 外围元素之和 | C++ | Compile Error | 0 MS | 0 KB | 408 | 2025-04-29 18:50:13 |
#include<iostream> using namespace std; int main(){ int a[101][101]={},n,m,sum=0; cin>>n>>m; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>a[i][j]; } } for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ if(i==1||i==n&&j==1||j==m){ sum+=a[i][j]; { } } cout<<sum; return 0; }
Main.cc: In function 'int main()': Main.cc:13:26: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(i==1||i==n&&j==1||j==m){ ^ Main.cc:20:1: error: expected '}' at end of input } ^ Main.cc:20:1: error: expected '}' at end of input