Discuss / Python / 交作业

交作业

Topic source

老帕小帕

#1 Created at ... [Delete] [Delete and Lock User]

应该对了

def move(n,x,y,z):
    if n == 1:
        print(x, '-->',z)
    else:
        move(n-1, x,z,y)
        print(x, '-->',z)
        move(n-1,y,x,z)

其实还是有点迷

不对呀,你这个


  • 1

Reply