Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
154465 杜禹轩 外围元素之和 C++ Wrong Answer 1 MS 280 KB 353 2026-05-30 14:17:45

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int a[101][101],n,m,h=0; cin>>n>>m; for(int i=1; i<=n; i++) { for(int j=1; j<=n; j++) { cin>>a[i][j]; } } for(int i=1; i<=n; i++) { for(int j=1; j<=n; j++) { if(i==0||j==0||i==i-1||j==j-1){ h+=a[i][j]; } } } cout<<h; return 0; }


Run Info:

------Input------
1 10 9 0 4 4 7 7 9 4 6 4
------Answer-----
54
------Your output-----
0