
'''simple docstring'''







import numpy as np
from numpy import floataa
from numpy.typing import NDArray
def       snake_case_	(       __SCREAMING_SNAKE_CASE      :				NDArray[floataa]   ,   __SCREAMING_SNAKE_CASE      :				NDArray[floataa]							):



						"""simple docstring"""





						lowercase_			:  Any									= np.shape(__SCREAMING_SNAKE_CASE							)

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

												lowercase_			:  str									= (vector[row] - total) / coefficients[row, row]

						return x
def       snake_case_	(       __SCREAMING_SNAKE_CASE      :				NDArray[floataa]   ,   __SCREAMING_SNAKE_CASE      :				NDArray[floataa]							):



						"""simple docstring"""





						lowercase_			:  List[Any]									= np.shape(__SCREAMING_SNAKE_CASE							)
						if rows != columns:
												return np.array(()   ,   dtype=__SCREAMING_SNAKE_CASE							)

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

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

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

						return x


if __name__ == "__main__":
							import doctest

							doctest.testmod()






'''simple docstring'''







def       snake_case_	(       __SCREAMING_SNAKE_CASE      :				int = 998001							):



						"""simple docstring"""





						lowercase_			:  Dict									= 0
						for i in range(999   ,   99   ,   -1							):  # 3 digit numbers range from 999 down to 100
												for j in range(999   ,   99   ,   -1							):
																		lowercase_			:  int									= str(i * j							)
																		if product_string == product_string[::-1] and i * j < n:
																								lowercase_			:  str									= max(__SCREAMING_SNAKE_CASE   ,   i * j							)
						return answer


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



