Discuss / Python / 打卡

打卡

Topic source

钱老板boss

#1 Created at ... [Delete] [Delete and Lock User]
if n == 1:
    print(a, '-->', c)
else:
    move(n-1,a,c,b)#a柱最上方的n-1个盘子落在b柱
    move(1,a,b,c)#a柱的最小面盘子落在c柱
    move(n-1,b,a,c)#b柱上的n-1个盘子,落在c柱

  • 1

Reply