python解決漢諾塔問題極其簡單

#!/usr/bin/env python3python # -*- coding: utf-8 -*- #hanoi.py def print_move(n, a, b):     print('move %d %s => %s' % (n, a, b)) def hanoi(n, a, b, c):     if n == 1:         print_move(n, a, c)    
相關文章
相關標籤/搜索