Run ID:125402
提交时间:2025-07-14 16:14:09
#include<bits/stdc++.h> using namespace std; int a[10][10]; int main(){ int n,m,s=0; cin>>n>>m; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin>>a[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ if(i==0||i==n-1||j==0||j==m-1){//外围段 s+=a[i][j]; } } cout<<endl; } return 0; }