Start: Apr, 17, 2017 10:00:00
Python程序设计基础培训第二次作业
End: Apr, 23, 2017 14:00:00
Time elapsed:
Time remaining:

Problem_ID: H
Result: Accepted
Time: 125ms
Memory: 21432kB
Author: 15557899509
In contest: 1086

#!/usr/bin/python
while True:
    s,n=map(str,raw_input().strip().split())
    if s=="@":
        break
    n=int(n)
    m=n-1
    tt=""
    for i in range(n):
        tt=" "*(m-i)
        if i==0:
            print tt+s
        elif i==n-1:
            print tt+s*(2*i+1)
        else:
            print tt+s+" "*(2*i-1)+s
    print