提交时间:2019-12-15 20:12:27

运行 ID: 3363

#include<iostream> using namespace std; int main(){ int a[11][11]; int n; int k=n; cin>>n; for(int i=1;i<=n;i++){ k=n; for(int j=1;j<=n;j++){ a[i][j]=i; if(j==1){ cout<<i<<" "; }else{ a[i][j]+=k; k+=n; cout<<a[i][j]<<" "; } } cout<<endl; } }