U E D R , A S I H C RSS

XOR삼각형/임인택

~cpp 
def xorTriangle(current, lineNum, list):
    newList = []
    for i in range(0, current) :
        if i==0 or i==current-1 :
            newList.append(1)
        else :
            newList.append( list[i-1]^list[i] )
            
    print newList
    
    if current<lineNum:
        xorTriangle(current+1, lineNum, newList)
    else :
        return

xorTriangle(1, 8, list)

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-05-27 07:09:19
Processing time 0.0134 sec