摘要: def hanoi(n,a,b,c): if n== 1: print("{}->{}".format(a,c)) else: hanoi(n-1,a,c,b) print("{}->{}".format(a,c)) hanoi(n-1,b,a,c) hanoi(5,'A','B','C') 阅读全文
posted @ 2017-05-11 09:12 低调小怪 阅读(638) 评论(0) 推荐(0)