




"""simple docstring"""
from __future__ import annotations





def 						UpperCAmelCase				(			A__:    list[int]							,				A__:    int     )  ->     bool:
			if len(A__     ) == 0:
						return False
			__lowerCamelCase					:	Any	       =				len(A__     ) // 2
			if a_list[midpoint] == item:
						return True
			if item < a_list[midpoint]:
						return binary_search(a_list[:midpoint]							,				A__     )
			else:
						return binary_search(a_list[midpoint + 1 :]							,				A__     )


if __name__ == "__main__":
					a_				:    str										=     input('''Enter numbers separated by comma:\n''').strip()
					a_				:    Optional[Any]										=     [int(item.strip()) for item in user_input.split(''',''')]
					a_				:    List[str]										=     int(input('''Enter the number to be found in the list:\n''').strip())
					a_				:    Any										=     '''''' if binary_search(sequence, target) else '''not '''
					print(F"""{target} was {not_str}found in {sequence}""")









"""simple docstring"""
def 						UpperCAmelCase				(			A__:    int							,				A__:    list[int]							,				A__:    int     )  ->     int:

			def count_of_possible_combinations(A__:    int     ) -> int:
						if target < 0:
									return 0
						if target == 0:
									return 1
						return sum(count_of_possible_combinations(target - item     ) for item in array     )

			return count_of_possible_combinations(A__     )





def 						UpperCAmelCase				(			A__:    int							,				A__:    list[int]							,				A__:    int     )  ->     int:

			def count_of_possible_combinations_with_dp_array(
			    A__:    int							,				A__:    list[int]     ) -> int:
						if target < 0:
									return 0
						if target == 0:
									return 1
						if dp_array[target] != -1:
									return dp_array[target]
						__lowerCamelCase					:	Dict	       =				sum(
						    count_of_possible_combinations_with_dp_array(target - item							,				A__     )
						    for item in array     )
						__lowerCamelCase					:	str	       =				answer
						return answer

			__lowerCamelCase					:	Union[str, Any]	       =				[-1] * (target + 1)
			return count_of_possible_combinations_with_dp_array(A__							,				A__     )





def 						UpperCAmelCase				(			A__:    int							,				A__:    list[int]							,				A__:    int     )  ->     int:
			__lowerCamelCase					:	int	       =				[0] * (target + 1)
			__lowerCamelCase					:	str	       =				1

			for i in range(1							,				target + 1     ):
						for j in range(A__     ):
									if i - array[j] >= 0:
												dp_array[i] += dp_array[i - array[j]]

			return dp_array[target]


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					a_				:    Any										=     3
					a_				:    str										=     5
					a_				:    List[Any]										=     [1, 2, 5]
					print(combination_sum_iv(n, array, target))



