| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 165458 | 杨金卓 | 拐角方阵 | C++ | Accepted | 1 MS | 264 KB | 520 | 2026-11-15 15:20:31 |
#include<bits/stdc++.h> using namespace std; int a[25][25]; int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ a[i][j]=i; } } int m=0; int x=1; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(m==0){ break; }else { a[i][j]=j; m--; } } m=x; x++; } for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ cout<<a[i][j]<<" "; } cout<<endl; } return 0; }