Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
63752 许铭锐 外围元素之和 C++ Compile Error 0 MS 0 KB 474 2024-01-19 17:41:36

Tests(0/0):


Code:

#include<iostream> #include<cstring> using namespace std; int main() { int n,m,A[110][110]={},B[110][110]={},i,j,res=0; cin>>m>>n; for(i=0;i<m;i++) { for(j=0;j<n;j++) { cin>>A[i][j]; } } for(i=0;i<n;i++) { res+=A[0][i]; } for(i=0;i<n;i++) { res+=A[m-1][i]; } cout<<res<<endl; for(i=1;i<m-1;i++) { for(j=0;j<n;j++) { if((j==0)||(j==n-1)) res+=A[i][j]; } } cout<<res; return 0; } 评论:


Run Info:

Main.cc:38:1: error: stray '\350' in program
 评论:
 ^
Main.cc:38:1: error: stray '\257' in program
Main.cc:38:1: error: stray '\204' in program
Main.cc:38:1: error: stray '\350' in program
Main.cc:38:1: error: stray '\256' in program
Main.cc:38:1: error: stray '\272' in program
Main.cc: In function 'int main()':
Main.cc:6:24: warning: unused variable 'B' [-Wunused-variable]
 int n,m,A[110][110]={},B[110][110]={},i,j,res=0; 
                        ^
Main.cc: At global scope:
Main.cc:38:7: error: expected unqualified-id before ':' token
 评论:
       ^