Guest
Login
跳过导航链接

杨辉三角形
Time Limit:1000MS  Memory Limit:32768K

Description:

打印杨辉三角形。

Input:

输入数据含有不多于50个的正整数n(n≤10)。

Output:

三角形的每个项占3个字符宽。每个三角形之间空一行,最后的三角形之后没有空行。见样本输出。

Sample Input:

10 3

Sample Output:

                             1
                          1     1
                       1     2     1
                    1     3     3     1
                 1     4     6     4     1
              1     5    10    10     5     1
           1     6    15    20    15     6     1
        1     7    21    35    35    21     7     1
     1     8    28    56    70    56    28     8     1	
  1     9    36    84   126   126    84    36     9     1

        1
     1     1
  1     2     1														

Source:

qianneng
Submit Your Solution


Zhe Jiang University Of Technology Online Programming Space Beta1.3
Designed & Developped By Jin Qiwei
Refactored By cb@zjut.edu.cn , QQ Group: 723311416  All Copyright Reserved 2006-
113