
"""simple docstring"""





from math import pow



def       lowerCamelCase__		(			__snake_case,     __snake_case,     __snake_case,     __snake_case,     __snake_case,     )							->		tuple[int, int]:


					"""simple docstring"""





					if current_sum == needed_sum:
										# If the sum of the powers is equal to needed_sum, then we have a solution.
										solutions_count += 1
										return current_sum, solutions_count

					_UpperCamelCase							 =  int(pow(__snake_case,     __snake_case	)	)
					if current_sum + i_to_n <= needed_sum:
										# If the sum of the powers is less than needed_sum, then continue adding powers.
										current_sum += i_to_n
										_UpperCamelCase ,  _UpperCamelCase							 =  backtrack(
										    __snake_case,     __snake_case,     current_number + 1,     __snake_case,     __snake_case	)
										current_sum -= i_to_n
					if i_to_n < needed_sum:
										# If the power of i is less than needed_sum, then try with the next power.
										_UpperCamelCase ,  _UpperCamelCase							 =  backtrack(
										    __snake_case,     __snake_case,     current_number + 1,     __snake_case,     __snake_case	)
					return current_sum, solutions_count



def       lowerCamelCase__		(			__snake_case,     __snake_case	)							->		int:


					"""simple docstring"""





					if not (1 <= needed_sum <= 10_00 and 2 <= power <= 10):
										raise ValueError(
										    '''Invalid input\n'''
										    '''needed_sum must be between 1 and 1000, power between 2 and 10.'''	)

					return backtrack(__snake_case,     __snake_case,     1,     0,     0	)[1]  # Return the solutions_count


if __name__ == "__main__":
				import doctest

				doctest.testmod()








"""simple docstring"""





from __future__ import annotations



def       lowerCamelCase__		(			__snake_case,     __snake_case	)							->		float:


					"""simple docstring"""





					_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)}""")






