| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 154477 | 王培臻 | 外围元素之和 | C++ | Wrong Answer | 1 MS | 280 KB | 337 | 2026-05-30 14:22:02 |
#include<bits/stdc++.h> using namespace std; int main() { long long a[100][100]; long long s,d,g=0; cin>>s>>d; for(int i=1;i<=s;i++){ for(int j=1;j<=d;j++){ cin>>a[i][j]; } } for(int i=1;i<=s;i++){ for(int j=1;j<=d;j++){ if(i==1||j==1||i==s-1||j==d-1){ g+=a[i][j]; } } } cout<<g; return 0; }
------Input------
8 5 3 9 8 1 3 7 6 0 3 2 8 2 5 8 5 0 3 6 2 4 1 6 9 3 3 4 2 9 5 6 8 1 9 0 6 8 8 3 5 6
------Answer-----
108
------Your output-----
102