汉诺塔 def hanoi(n, ch1, ch2, ch3): #********** Begin ********** if(n == 1): print(ch1,"->",ch3) return hanoi(n-1, ch1, ch3, ch2) hanoi(1, ch1, ch2, ch3) hanoi(n-1, ch2, ch1, ch3) #********** End ********** plate_nums = int(input("请输入盘子的数量:")) print(plate_nums) hanoi(plate_nums, 'A', 'B', 'C')