Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
128966 陈奕涵 外围元素之和 C++ Compile Error 0 MS 0 KB 506 2025-08-21 14:33:23

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,m,a[21][21],c; cin>>n>>m; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin>>a[i][j]; if(i==0||i==n-1){ c+=a[i][j]; } if(j==0||j==m-1){ c+a[i][j] } } } cout<<c<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:18:4: error: expected ';' before '}' token
    }
    ^
Main.cc:17:6: warning: statement has no effect [-Wunused-value]
     c+a[i][j]
      ^