| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 67137 | 万隽宇 | 数字方阵 | C++ | Wrong Answer | 1 MS | 272 KB | 454 | 2024-03-14 18:41:08 |
# include<iostream> using namespace std; int main(){ int n,c=0,d=0,m=1; cin>>n; int a[n][n]; for(int b=1;b<n-1;b++){ for(int i=d;i<n-c;i++){ for(int j=d;j<n-c;j++){ a[i][j]=m; } } m++; d++; c++; } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cout<<a[i][j]; } cout<<endl; } return 0; }
------Input------
5
------Answer-----
1 1 1 1 1 1 2 2 2 1 1 2 3 2 1 1 2 2 2 1 1 1 1 1 1
------Your output-----
11111 12221 12321 12221 11111