Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
113847 | 刘珩宇 | 数字方阵 | C++ | Wrong Answer | 1 MS | 268 KB | 545 | 2025-03-16 18:28:47 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int i,j,k,n,a[10][10]={0},min=0,sum=0; cin>>n; for(k=0;k<n;k++){ for(i=k;i<n-k;i++){ for(j=k;j<n-k;j++){ a[i][j]=k+1; } } } for(i=0;i<n;i++){ for(j=0;j<n;j++){ cout<<a[i][j]<<" "; } cout<<endl; } cout<<sum; 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-----
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 0