Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
139506 杰苏尔纳迪尔 回型方阵 C++ Accepted 100 0 MS 248 KB 336 2024-03-23 17:31:12

Tests(5/5):


#include<iostream> #include<iomanip> using namespace std; int main(){ int n,a[10][10]; cin>>n; for(int k=1;k<=(n+1)/2;k++){ for(int i=k;i<=n+1-k;i++){ for(int j=k;j<=n+1-k;j++) a[i][j]=k; } } for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++) cout<<setw(5)<<right<<a[i][j]; cout<<endl; } return 0; }


Judgement Protocol: