/*
  题目:
  思路:
 */
#include <bits/stdc++.h>
using namespace std;
int a[100][100];

int main() {

	int s;
	cin >> s;


	for (int i = 1; i <= s; i++) {
		a[i][1] = i;



	}

	for (int sw = 2; sw <= s; sw++) {
		for (int h = 1; h <= s; h++) {

			if (a[h + 1][sw - 1] != 0 && a[h][sw - 1] != 0) {
				a[h][sw] = a[h + 1][sw - 1] + a[h][sw - 1];


			}



		}



	}

	for (int i = 1; i <= s; i++) {
		for (int j = 1; j <= s; j++) {
			if (j == 1 && a[i][j] != 0) {
				cout << setw(5 * i) << a[i][j];





			} else if (a[i][j] != 0) {
				cout << setw(5) << a[i][j];


			}


		}
		cout << endl;
	}





	return 0;
}


0 条评论

目前还没有评论...