2020年7月24日
摘要: 汉诺塔应用到了最简单的迭代,最基本的代码如下: def hannoi(n, a, c, b, step): if n != 0: hannoi(n - 1, a, b, c, step) print("Moving form %s to %s" % (a, b)) hannoi(n - 1, c, 阅读全文
posted @ 2020-07-24 08:21 Bethuel 阅读(136) 评论(0) 推荐(0)