





def       UpperCAmelCase							(     _lowerCamelCase      :  list[list[int | float]]     ):





						'''simple docstring'''


						SCREAMING_SNAKE_CASE__     :				Dict   =					len(_lowerCamelCase     )
						SCREAMING_SNAKE_CASE__     :				List[Any]   =					len(matrix[0]     )
						SCREAMING_SNAKE_CASE__     :				Any   =					min(_lowerCamelCase			,   _lowerCamelCase     )

						for row in range(_lowerCamelCase     ):
												# Check if diagonal element is not zero
												if matrix[row][row] != 0:
																		# Eliminate all the elements below the diagonal
																		for col in range(row + 1			,   _lowerCamelCase     ):
																								SCREAMING_SNAKE_CASE__     :				int   =					matrix[col][row] / matrix[row][row]
																								for i in range(_lowerCamelCase			,   _lowerCamelCase     ):
																														matrix[col][i] -= multiplier * matrix[row][i]
												else:
																		# Find a non-zero diagonal element to swap rows
																		SCREAMING_SNAKE_CASE__     :				Any   =					True
																		for i in range(row + 1			,   _lowerCamelCase     ):
																								if matrix[i][row] != 0:
																														SCREAMING_SNAKE_CASE__,							SCREAMING_SNAKE_CASE__     :				Union[str, Any]   =					matrix[i], matrix[row]
																														SCREAMING_SNAKE_CASE__     :				Optional[Any]   =					False
																														break
																		if reduce:
																								rank -= 1
																								for i in range(_lowerCamelCase     ):
																														SCREAMING_SNAKE_CASE__     :				Any   =					matrix[i][rank]

            # Reduce the row pointer by one to stay on the same row
																		row -= 1

						return rank


if __name__ == "__main__":
				import doctest

				doctest.testmod()






def       UpperCAmelCase							(     _lowerCamelCase      :  int = 1_000     ):





						'''simple docstring'''


						SCREAMING_SNAKE_CASE__     :				Dict   =					-1
						SCREAMING_SNAKE_CASE__     :				str   =					0
						for a in range(1			,   n // 3     ):
												# Solving the two equations a**2+b**2=c**2 and a+b+c=N eliminating c
												SCREAMING_SNAKE_CASE__     :				Tuple   =					(n * n - 2 * a * n) // (2 * n - 2 * a)
												SCREAMING_SNAKE_CASE__     :				Dict   =					n - a - b
												if c * c == (a * a + b * b):
																		SCREAMING_SNAKE_CASE__     :				str   =					a * b * c
																		if candidate >= product:
																								SCREAMING_SNAKE_CASE__     :				List[str]   =					candidate
						return product


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