#include<bits/stdc++.h> using namespace std; int a[10][10],n; int main(){ cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(i<=j){ a[i][j]=j; } else a[i][j]=i; } } for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ cout<<setw(3)<<a[i][j]; } cout<<endl; } return 0; } /************************************************************** Problem: 1199 User: hongguangxi Language: C++ Result: Accepted Time:12 ms Memory:2072 kb ****************************************************************/