1902: 【CSP二维数组】有趣的数字图形II▅

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:1 Solved:1

Description

输入一个整数 lns="http://www.w3.org/1998/Math/MathML">n  lns="http://www.w3.org/1998/Math/MathML">n12),打印出如下要求的方阵:左上到右下对角线上的数与行数相同,右上半个区域中每个元素等于左边的和下面的元素之和。每个元素场宽为 lns="http://www.w3.org/1998/Math/MathML">5 。左下半个区域为空。

Input

一个整数 lns="http://www.w3.org/1998/Math/MathML">n  lns="http://www.w3.org/1998/Math/MathML">n12 

Output

n×n 的方阵(场宽为 lns="http://www.w3.org/1998/Math/MathML">5 )。

Sample Input Copy

4

Sample Output Copy

    1    3    8   20
         2    5   12
              3    7
                   4