




from __future__ import annotations

from math import ceil, floor, sqrt




def        _SCREAMING_SNAKE_CASE      (		snake_case = 2_0_0_0_0_0_0       )						->				int:
						_UpperCAmelCase      =			[0]
						_UpperCAmelCase      =			42

						for idx in range(1			,     ceil(sqrt(target * 2       ) * 1.1       )       ):
												triangle_numbers.append(triangle_numbers[-1] + idx       )

						# we want this to be as close as possible to target
						_UpperCAmelCase      =			0
						# the area corresponding to the grid that gives the product closest to target
						_UpperCAmelCase      =			0
						# an estimate of b, using the quadratic formula
						_UpperCAmelCase      =			42
						# the largest integer less than b_estimate
						_UpperCAmelCase      =			42
						# the largest integer less than b_estimate
						_UpperCAmelCase      =			42
						# the triangle number corresponding to b_floor
						_UpperCAmelCase      =			42
						# the triangle number corresponding to b_ceil
						_UpperCAmelCase      =			42

						for idx_a, triangle_a in enumerate(triangle_numbers[1:]			,     1       ):
												_UpperCAmelCase      =			(-1 + sqrt(1 + 8 * target / triangle_a       )) / 2
												_UpperCAmelCase      =			floor(snake_case       )
												_UpperCAmelCase      =			ceil(snake_case       )
												_UpperCAmelCase      =			triangle_numbers[b_floor]
												_UpperCAmelCase      =			triangle_numbers[b_ceil]

												if abs(target - triangle_b_first_guess * triangle_a       ) < abs(
												    target - best_product       ):
																		_UpperCAmelCase      =			triangle_b_first_guess * triangle_a
																		_UpperCAmelCase      =			idx_a * b_floor

												if abs(target - triangle_b_second_guess * triangle_a       ) < abs(
												    target - best_product       ):
																		_UpperCAmelCase      =			triangle_b_second_guess * triangle_a
																		_UpperCAmelCase      =			idx_a * b_ceil

						return area


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





from __future__ import annotations




def        _SCREAMING_SNAKE_CASE      (		snake_case			,     snake_case       )						->				float:
						_UpperCAmelCase      =			sorted(numsa + numsa       )
						_UpperCAmelCase    ,					_UpperCAmelCase      =			divmod(len(snake_case       )			,     2       )
						if mod == 1:
												return all_numbers[div]
						else:
												return (all_numbers[div] + all_numbers[div - 1]) / 2


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				a													=			[float(x) for x in input("Enter the elements of first array: ").split()]
				a													=			[float(x) for x in input("Enter the elements of second array: ").split()]
				print(F'The median of two arrays is: {median_of_two_arrays(array_a, array_a)}')