摘要: def hanoi(n,a,b,c): if n==1: print(n,a+'->'+c) else: hanoi(n-1,a,c,b) print(n,a+'->'+c) hanoi(n-1,b,a,c) hanoi(3,'A','B','C') 阅读全文
posted @ 2018-06-13 21:19 CarmenWong 阅读(126) 评论(0) 推荐(0) 编辑