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


def SCREAMING_SNAKE_CASE					(  lowercase_:						NDArray[floataa]		,    lowercase_:						NDArray[floataa]					):
       _UpperCamelCase    ,   _UpperCamelCase  :							List[str]	    =	np.shape(lowercase_					)

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

              _UpperCamelCase  :							int	    =	(vector[row] - total) / coefficients[row, row]

       return x


def SCREAMING_SNAKE_CASE					(  lowercase_:						NDArray[floataa]		,    lowercase_:						NDArray[floataa]					):
       _UpperCamelCase    ,   _UpperCamelCase  :							Union[str, Any]	    =	np.shape(lowercase_					)
       if rows != columns:
              return np.array(()		,    dtype=lowercase_					)

       # augmented matrix
       _UpperCamelCase  :							NDArray[floataa]	    =	np.concatenate((coefficients, vector)		,    axis=1					)
       _UpperCamelCase  :							Dict	    =	augmented_mat.astype('float64'					)

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

       _UpperCamelCase  :							List[Any]	    =	retroactive_resolution(
           augmented_mat[:, 0:columns]		,    augmented_mat[:, columns : columns + 1]					)

       return x


if __name__ == "__main__":
 import doctest

 doctest.testmod()




def SCREAMING_SNAKE_CASE					(  lowercase_:						int					):
       return n * (2 * n - 1)


def SCREAMING_SNAKE_CASE					(  lowercase_:						int					):
       _UpperCamelCase  :							str	    =	(1 + 24 * n) ** 0.5
       return ((1 + root) / 6) % 1 == 0


def SCREAMING_SNAKE_CASE					(  lowercase_:						int = 144					):
       _UpperCamelCase  :							Optional[Any]	    =	start
       _UpperCamelCase  :							List[str]	    =	hexagonal_num(lowercase_					)
       while not is_pentagonal(lowercase_					):
              n += 1
              _UpperCamelCase  :							Optional[int]	    =	hexagonal_num(lowercase_					)
       return num


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



