<doocs>2320.Count Number of Ways to Place Houses_1.py
def countHousePlacements( n: int) -> int:
    mod = 10**9 + 7
    f = [[0] * 2 for _ in range(n)]
    f[0] = [1, 1]
    for i in range(1, n):
        f[i][0] = f[i - 1][0] + f[i - 1][1]
        f[i][1] = f[i - 1][0]
    s = sum(f[-1])
    return (s * s) % mod
def sample_funcname ( var_0 : int ) -> int :
    var_5 = 10 ** 9 + 7
    var_10 = [ [ 0 ] * 2 for var_8 in range ( var_0 ) ]
    var_10 [ 0 ] = [ 1 , 1 ]
    for var_12 in range ( 1 , var_0 ) :
        var_10 [ var_12 ] [ 0 ] = var_10 [ var_12 - 1 ] [ 0 ] + var_10 [ var_12 - 1 ] [ 1 ]
        var_10 [ var_12 ] [ 1 ] = var_10 [ var_12 - 1 ] [ 0 ]
    var_14 = sum ( var_10 [ - 1 ] )
    return ( var_14 * var_14 ) % var_5
