Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
114918 杨登博 数字方阵 C++ Wrong Answer 1 MS 304 KB 567 2025-03-24 20:45:29

Tests(0/2):


Code:

#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 n; int a[101][101]={0}; cin>>n; for(int k=0;k<n;k++){ for(int i=0;i<n-k;i++) for(int j=0;j<n-k;j++) a[i][j]=k+1; } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cout<<a[i][j]<<" "; } cout<<endl; } return 0; }


Run Info:

------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-----
5 4 3 2 1 4 4 3 2 1 3 3 3 2 1 2 2 2 2 1 1 1 1 1 1