求助,样例过了,但是全WA

B2108 图像模糊处理

``` #include<iostream> using namespace std; int main(){ int n,m; cin>>n>>m; int a[105][105]; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>a[i][j]; } } for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ if(i==1 || i==n ||j==1||j==m){ printf("%d ",a[i][j]); } else{ printf("%.0lf ",(a[i][j]+a[i-1][j]+a[i+1][j]+a[i][j-1]+a[i][j+1])*1.0/5); } } printf("\n"); } return 0; }
by wzs___ @ 2024-07-30 09:49:36


@[Yinny](/user/1061866)
by wzs___ @ 2024-07-30 09:53:12


|