1 条题解
-
1
#include <iostream> using namespace std; int main() { int n; cin >> n; int yanghui[10][10] = {0}; yanghui[0][0] = 1; for(int i = 1; i < 10; i++) { yanghui[i][0] = 1; for(int j = 1; j <= i; j++) { yanghui[i][j] = yanghui[i-1][j-1] + yanghui[i-1][j]; } } for(int i = n-1; i >= 0; i--) { for(int j = 0; j <= i; j++) { cout << yanghui[i][j]; if(j < i) cout << " "; } cout << endl; } system("pause"); return 0; }
- 1
信息
- ID
- 364
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- 7
- 标签
- 递交数
- 24
- 已通过
- 8
- 上传者