#T386. 杨辉三角形

杨辉三角形

Description

Print the first nn (2n202 \leq n \leq 20) rows of Yang Hui's Triangle (Pascal's Triangle). Yang Hui's Triangle is shown as follows:

When n=5n=5

        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 nn.

Output Format

Output the triangle as described. There are nn 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