#include<bits/stdc++.h> using namespace std; int main(){ int n,a[100][100]; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(i<=j) a[i][j]=n-j+1; else a[i][j]=n-i+1; } } 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: 1197 User: lidongbo Language: C++ Result: Wrong Answer ****************************************************************/