#T614. 杨辉三角形

杨辉三角形

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 in the problem statement. There should be 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

(注:根据提供的上下文,"CodesOnline" 是一个专有名词/品牌名称,按照翻译惯例保留原名称不译。若需进一步调整请提供更多背景信息。)

保留Markdown格式说明:

  • 标题层级 ## 保留原样
  • 专有名词直接保留符合技术文档翻译规范
  • 无代码块故未展示相关保留规则