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: 111ms
Memory: 21432kB
Author: 13857575759
In contest: 1086

#!/usr/bin/python
# -*- coding: UTF-8 -*-
while True:
    a,b=map(str,raw_input().strip().split())
    row=int(b)
    if a=="@":
        break
    else:
        for i in range(1,row+1,1):
            if i==1:
                print (row-i)*" "+a
            elif i==row:
                print (2*row-1)*a
            else:
                print (row-i)*" "+a+(2*i-3)*" "+a
        print