Python: a rectangular footprint

We can use 2 small rectangle 1 of sideways or vertically to cover a larger rectangle. Will the use of n 2 small rectangle 1 coverage without overlap a large rectangle 2 * n, a total of how many ways?

The second n-rectangular cover the second method is equal to plus Method 2 * (n-2) of the (n-1).
f = lambda n: 1 if n <2 else f (n - 1) + f (n - 2)

Guess you like

Origin blog.csdn.net/weixin_44523387/article/details/91974339