#T386. 杨辉三角形
杨辉三角形
Description
Print the first () rows of Yang Hui's Triangle (Pascal's Triangle). Yang Hui's Triangle is shown as follows:
When
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
output:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
Input Format
The number of lines .
Output Format
Output the triangle as described. There are lines, with numbers separated by a single space in each line.
5
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
来源
CodesOnline