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

while True:
    try:
        s=list(map(str,input().split()))
        a=s[0]
        if a=="@":
            break
        i=1
        b=int(s[1])
        while i<b:
            if i==1:
                print((b-i)*" "+a)
            else:
                print((b-i)*" "+a+(2*i-3)*" "+a)
            i=i+1
        else:
            print((2*b-1)*a+"\n")
    except EOFError:
        break