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