'''simple docstring'''




from __future__ import annotations




def 							lowerCamelCase	(      UpperCAmelCase__       :					float      ,      UpperCAmelCase__       :					float      ,      UpperCAmelCase__       :					float )			->      dict[str, float]:
							if (voltage, current, resistance).count(0 ) != 1:
														raise ValueError("""One and only one argument must be 0""" )
							if resistance < 0:
														raise ValueError("""Resistance cannot be negative""" )
							if voltage == 0:
														return {"voltage": float(current * resistance )}
							elif current == 0:
														return {"current": voltage / resistance}
							elif resistance == 0:
														return {"resistance": voltage / current}
							else:
														raise ValueError("""Exactly one argument must be 0""" )


if __name__ == "__main__":
						import doctest

						doctest.testmod()






'''simple docstring'''




import os




def 							lowerCamelCase	(      UpperCAmelCase__       :					str = "input.txt" )			->      int:

							with open(os.path.join(os.path.dirname(UpperCAmelCase__ )      ,      UpperCAmelCase__ ) ) as input_file:
														lowercase_					:			str										=       [
														    [int(UpperCAmelCase__ ) for element in line.split(""",""" )]
														    for line in input_file.readlines()
														]

							lowercase_					:			Optional[Any]										=       len(UpperCAmelCase__ )
							lowercase_					:			Any										=       len(matrix[0] )

							lowercase_					:			Union[str, Any]										=       [[-1 for _ in range(UpperCAmelCase__ )] for _ in range(UpperCAmelCase__ )]
							for i in range(UpperCAmelCase__ ):
														lowercase_					:			int										=       matrix[i][0]

							for j in range(1      ,      UpperCAmelCase__ ):
														for i in range(UpperCAmelCase__ ):
																					lowercase_					:			Union[str, Any]										=       minimal_path_sums[i][j - 1] + matrix[i][j]

														for i in range(1      ,      UpperCAmelCase__ ):
																					lowercase_					:			Tuple										=       min(
																					    minimal_path_sums[i][j]      ,      minimal_path_sums[i - 1][j] + matrix[i][j] )

														for i in range(rows - 2      ,      -1      ,      -1 ):
																					lowercase_					:			Dict										=       min(
																					    minimal_path_sums[i][j]      ,      minimal_path_sums[i + 1][j] + matrix[i][j] )

							return min(minimal_path_sums_row[-1] for minimal_path_sums_row in minimal_path_sums )


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





