Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
8419 刘逸杭 数字方阵 C++ Accepted 0 MS 264 KB 357 2025-12-20 10:51:48

Tests(2/2):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,a[10][10]; cin>>n; for(int i=0;i<n/2+1;i++) for(int j=i;j<n-i;j++) for(int k=i;k<n-i;k++) a[j][k]=i+1; for(int i=0;i<n;i++){ for(int j=0;j<n;j++) cout<<a[i][j]<<' '; cout<<endl; } return 0; }