Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
108229 | 胡海峰老师 | 外围元素之和 | C++ | Accepted | 1 MS | 268 KB | 267 | 2025-01-19 20:35:41 |
#include <iostream> using namespace std; int a[10][10]; int main(){ int m,n,d,res=0; cin>>m>>n; for(int i=0;i<m;i++) for(int j=0;j<n;j++) { cin>>d; if(i==0 || j==0 || i==m-1 || j==n-1) res += d; } cout<<res; return 0; }