~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
   


Retrieved from http://wiki.zeropage.org/wiki.php/마름모출력/남도연
last modified 2021-02-07 05:29:23