steps = 0
def hanoi(src,des,mid,n):
global steps
if n == 1:
steps += 1
print("[STEP{:>4}] {}->{}"</
Python练习题11:汉诺塔实践
最新推荐文章于 2025-05-18 16:04:33 发布
steps = 0
def hanoi(src,des,mid,n):
global steps
if n == 1:
steps += 1
print("[STEP{:>4}] {}->{}"</