倒数字三角形


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

数字三角形的特征是三角形由数字填满,每行数字从1到9再到0周而复始挨个排列。你的任务是根据整数值输出倒数字三角形。

Input

输入数据含有一些整数,其值在[1,40]之间。

Output

对于每个输入值n,输出其高为n的数字倒三角形,其形见样本输入和输出描述。

Sample

Input

9
2

Output

12345678901234567
 123456789012345
  1234567890123
   12345678901
    123456789
     1234567
      12345
       123
        1
123
 1

Comments

There are no comments at the moment.