摘要: 汉诺塔问题 n = int(input()) count = 0 def hanoi(n,a,b,c): global count if n == 1: print("将第{}个从{}搬到{}".format(1,a,c)) count += 1 else: hanoi(n-1,a,c,b) pri 阅读全文
posted @ 2020-03-30 17:36 玩的三立方 阅读(304) 评论(0) 推荐(0) 编辑