U E D R , A S I H C RSS

마름모출력/김정현

No older revisions available

No older revisions available



~cpp 
if __name__ == '__main__':
    a=str(raw_input("패턴 입력: "))
    b=int(input("변의 길이 입력: "))

    l=[0]
    stack=[]
    for n in range(b*2-1):
        l.insert(n," ")
    l.insert(b-1,a)

    for m in range(b): 
        for n in range(b*2-1):
            print l[n],
        l[b-m-2]=a
        l[b+m]=a  
        print ""

    for m in range(b-1):
        
        l[m]=" "        
        l[b+b-2-m]=" "      
        for n in range(b*2-1):
            print l[n],        
        print ""
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:23
Processing time 0.0140 sec