




def 					_a							(					lowerCAmelCase    ,						lowerCAmelCase )->	Dict:
		if b == 0:
				return 1
		if (b % 2) == 0:
				return actual_power(lowerCAmelCase    ,						int(b / 2 ) ) * actual_power(lowerCAmelCase    ,						int(b / 2 ) )
		else:
				return a * actual_power(lowerCAmelCase    ,						int(b / 2 ) ) * actual_power(lowerCAmelCase    ,						int(b / 2 ) )


def 					_a							(					lowerCAmelCase    ,						lowerCAmelCase )->	float:
		if b < 0:
				return 1 / actual_power(lowerCAmelCase    ,						lowerCAmelCase )
		return actual_power(lowerCAmelCase    ,						lowerCAmelCase )


if __name__ == "__main__":
						print(power(-2, -3))





import functools


def 					_a							(					lowerCAmelCase    ,						lowerCAmelCase )->	int:

		# Validation
		if not isinstance(lowerCAmelCase    ,						lowerCAmelCase ) or not all(isinstance(lowerCAmelCase    ,						lowerCAmelCase ) for day in days ):
				raise ValueError('The parameter days should be a list of integers' )

		if len(lowerCAmelCase ) != 3 or not all(isinstance(lowerCAmelCase    ,						lowerCAmelCase ) for cost in costs ):
				raise ValueError('The parameter costs should be a list of three integers' )

		if len(lowerCAmelCase ) == 0:
				return 0

		if min(lowerCAmelCase ) <= 0:
				raise ValueError('All days elements should be greater than 0' )

		if max(lowerCAmelCase ) >= 366:
				raise ValueError('All days elements should be less than 366' )

		SCREAMING_SNAKE_CASE_					      =							set(lowerCAmelCase )

		@functools.cache
		def dynamic_programming(lowerCAmelCase ) -> int:
				if index > 365:
						return 0

				if index not in days_set:
						return dynamic_programming(index + 1 )

				return min(
				    costs[0] + dynamic_programming(index + 1 )    ,						costs[1] + dynamic_programming(index + 7 )    ,						costs[2] + dynamic_programming(index + 30 )    ,						)

		return dynamic_programming(1 )


if __name__ == "__main__":
						import doctest

						doctest.testmod()