U E D R , A S I H C RSS

마름모출력/남도연

~cpp 
if __name__=='__main__':
   
    n=raw_input('패턴입력:')
    k=input('변의 길이 입력:')
    for x in range(1,2*k,2):
        print ' ' * ((2*k-x)/2),
        print 'n'* x
    for x in range(1,2*(k-1),2)[::-1]:
        print ' ' * ((2*k-x)/2),
        print 'n'* x
   

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:23
Processing time 0.0126 sec