~cpp 

if __name__== '__main__':
    print '패턴 입력 : '
    p = raw_input()
    print '  변의 길이 입력 :'
    n = input()

    for i in range(n+1):
        print ' '*(n-i),
        print p*(2*i-1)

    for i in range(n):
        print ' '*(i+1),
        print p*(2*(n-1-i)-1)


Retrieved from http://wiki.zeropage.org/wiki.php/마름모출력/허아영
last modified 2021-02-07 05:29:24