




import numpy as np
from numpy import floataa
from numpy.typing import NDArray




def        __SCREAMING_SNAKE_CASE (	lowercase_       ,  lowercase_   )							->						NDArray[floataa]:

    """simple docstring"""


    __UpperCamelCase		,   __UpperCamelCase			=    np.shape(lowercase_   )

    __UpperCamelCase			=    np.zeros((rows, 1)       ,  dtype=lowercase_   )
    for row in reversed(range(lowercase_   )   ):
        __UpperCamelCase			=    0
        for col in range(row + 1       ,  lowercase_   ):
            total += coefficients[row, col] * x[col]

        __UpperCamelCase			=    (vector[row] - total) / coefficients[row, row]

    return x




def        __SCREAMING_SNAKE_CASE (	lowercase_       ,  lowercase_   )							->						NDArray[floataa]:

    """simple docstring"""


    __UpperCamelCase		,   __UpperCamelCase			=    np.shape(lowercase_   )
    if rows != columns:
        return np.array(()       ,  dtype=lowercase_   )

    # augmented matrix
    __UpperCamelCase			=    np.concatenate((coefficients, vector)       ,  axis=1   )
    __UpperCamelCase			=    augmented_mat.astype('''float64'''   )

    # scale the matrix leaving it triangular
    for row in range(rows - 1   ):
        __UpperCamelCase			=    augmented_mat[row, row]
        for col in range(row + 1       ,  lowercase_   ):
            __UpperCamelCase			=    augmented_mat[col, row] / pivot
            augmented_mat[col, :] -= factor * augmented_mat[row, :]

    __UpperCamelCase			=    retroactive_resolution(
        augmented_mat[:, 0:columns]       ,  augmented_mat[:, columns : columns + 1]   )

    return x


if __name__ == "__main__":
 import doctest

 doctest.testmod()












def 							__lowerCAmelCase			(UpperCAmelCase_		):
    return n * (2 * n - 1)
def 							__lowerCAmelCase			(UpperCAmelCase_		):
    a__  			=							(1 + 24 * n) ** 0.5
    return ((1 + root) / 6) % 1 == 0
def 							__lowerCAmelCase			(UpperCAmelCase_ = 144		):
    a__  			=							start
    a__  			=							hexagonal_num(UpperCAmelCase_		)
    while not is_pentagonal(UpperCAmelCase_		):
        n += 1
        a__  			=							hexagonal_num(UpperCAmelCase_		)
    return num


if __name__ == "__main__":
 print(F"{solution()} = ")






