琛琛很喜歡吃披薩,但是調皮的承恩活動長,在某次的披薩聚會中,把琛琛最喜歡吃的30吋納豆口味披薩壓在了另外
你可以告訴琛琛,當披薩數N為多少時,要怎麼移動,才可以花最少步數把所有披薩原封不動從
輸入一整數
N <= 30
輸出琛琛移動披薩的步驟
3
from A to C from A to B from C to B from A to C from B to A from B to C from A to C
5
from A to C from A to B from C to B from A to C from B to A from B to C from A to C from A to B from C to B from C to A from B to A from C to B from A to C from A to B from C to B from A to C from B to A from B to C from A to C from B to A from C to B from C to A from B to A from B to C from A to C from A to B from C to B from A to C from B to A from B to C from A to C
遞迴