

def 					_lowercase     (				a_				:					list[list[int | float]]				)				->	int:




					'''simple docstring'''







					__magic_name__							=    len(SCREAMING_SNAKE_CASE_				)
					__magic_name__							=    len(matrix[0]				)
					__magic_name__							=    min(SCREAMING_SNAKE_CASE_					,SCREAMING_SNAKE_CASE_				)

					for row in range(SCREAMING_SNAKE_CASE_				):
										# 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					,SCREAMING_SNAKE_CASE_				):
																				__magic_name__							=    matrix[col][row] / matrix[row][row]
																				for i in range(SCREAMING_SNAKE_CASE_					,SCREAMING_SNAKE_CASE_				):
																									matrix[col][i] -= multiplier * matrix[row][i]
										else:
															# Find a non-zero diagonal element to swap rows
															__magic_name__							=    True
															for i in range(row + 1					,SCREAMING_SNAKE_CASE_				):
																				if matrix[i][row] != 0:
																									__magic_name__							=    matrix[i], matrix[row]
																									__magic_name__							=    False
																									break
															if reduce:
																				rank -= 1
																				for i in range(SCREAMING_SNAKE_CASE_				):
																									__magic_name__							=    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()







from __future__ import annotations




def 					_lowercase     (				a_				:					int				)				->	bool:




					'''simple docstring'''







					__magic_name__							=    str(a_				)
					return len(a_				) == 9 and set(a_				) == set('123456789'				)




def 					_lowercase     (				)				->	int | None:




					'''simple docstring'''







					for base_num in range(9_9_9_9					,4_9_9_9					,-1				):
										__magic_name__							=    1_0_0_0_0_2 * base_num
										if is_9_pandigital(a_				):
															return candidate

					for base_num in range(3_3_3					,9_9					,-1				):
										__magic_name__							=    1_0_0_2_0_0_3 * base_num
										if is_9_pandigital(a_				):
															return candidate

					return None


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




