Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
5955 | 高振轩 | 二维数组输出(1) | C++ | Accepted | 0 MS | 264 KB | 272 | 2024-12-21 15:16:32 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,a[100][100],b=1; cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ a[i][j]=b++; } } for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ cout<<a[i][j]<<' '; } cout<<endl; } }