




"""simple docstring"""
def 						UpperCAmelCase				(			A__:    int							,				A__:    int     )  ->     float:
			return base * power(A__							,				(exponent - 1)     ) if exponent else 1


if __name__ == "__main__":
					print('''Raise base to the power of exponent using recursion...''')
					a_				:    Tuple										=     int(input('''Enter the base: ''').strip())
					a_				:    int										=     int(input('''Enter the exponent: ''').strip())
					a_				:    Optional[Any]										=     power(base, abs(exponent))
					if exponent < 0:  # power() does not properly deal w/ negative exponents
										a_				:    Optional[Any]										=     1 / result
					print(F"""{base} to the power of {exponent} is {result}""")









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



