Move N rings from A to C
可以拆解成三步驟
Move (N - 1) rings from A to B Move ring N from A to C Move (N - 1) rings from B to C
遞迴到 N = 1 時,輸出一行後停止增加遞迴 (N, FROM, TO 會隨遞迴狀況變動,就是要傳入的參數了)
N
FROM
TO
Move ring {N} from {FROM} to {TO}
{N}
{FROM}
{TO}