Start: Nov, 12, 2017 10:00:00
2017秋Python程序设计基础培训第二次作业
End: Nov, 19, 2017 12:00:00
Time elapsed:
Time remaining:

Problem_ID: H
Result: Accepted
Time: 100ms
Memory: 24300kB
Author: th000
In contest: 1122

while True:
    a=list(map(str,input().split()))
    if a[0]=="@":
        break
    x=a[0]
    y=int(a[1])
    for i in range(1,y+1):
        if i ==1:
                print(" "*(y-1) + x)
        elif i==y:
                print(x*(2*i-1))
        else:
                print(" "*(y-i)+x+" "*(2*i-3)+x)
    print()