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: 96ms
Memory: 24300kB
Author: 378991029
In contest: 1122

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