Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
2988 邓小龙 数字方阵 C++ Accepted 0 MS 268 KB 348 2024-03-16 12:26:07

Tests(2/2):


Code:

# include<iostream> using namespace std; int main(){ int n, juzhen[10][10]={}; cin>>n; for(int i = 0; i < n/2+n%2; i++)for(int x = i; x < n-i; x++)for(int y = i; y < n-i; y++)juzhen[y][x]=i+1; for(int y = 0; y < n; y++){ for(int x = 0; x < n; x++)cout<<juzhen[y][x]<<" "; cout<<endl; } return 0; }