| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149282 | 郑雨心 | 拐角方阵 | C++ | Wrong Answer | 0 MS | 272 KB | 418 | 2026-03-08 18:31:47 |
#include <iostream> using namespace std; int a[50][50]; int main() { int n,m=1; cin>>n; for(int i=1;i<=n;i++) { for(int j=1;j<=n;j++) { if(i==m||j>i) { a[i][j]=m; } } for(int z=1;z<=n;z++) { if(i==m||z>i) { a[z][i]=m; } } m++; } for(int i=1;i<=n;i++) { for(int j=1;j<=n;j++) { cout<<a[i][j]<<" "; } cout<<endl; } return 0; }
------Input------
5
------Answer-----
1 1 1 1 1 1 2 2 2 2 1 2 3 3 3 1 2 3 4 4 1 2 3 4 5
------Your output-----
1 2 3 4 5 2 2 3 4 5 3 3 3 4 5 4 4 4 4 5 5 5 5 5 5