Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
95445 | hby | 拐角方阵 | C++ | Accepted | 1 MS | 296 KB | 345 | 2024-10-27 18:22:31 |
#include <iostream> using namespace std; int a[1000][1000]; int main(){ int n,m,c=1; cin>>n; for(int k=1;k<=n;k++){ for(int i=k;i<=n;i++){ for(int j=k;j<=n;j++){ a[i][j]=k; } } } for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ cout<<a[i][j]<<' '; } cout<<endl; } return 0; }