




def 					_a							(					lowerCAmelCase )->	str:

		if isinstance(lowerCAmelCase    ,						lowerCAmelCase ):
				raise TypeError('\'float\' object cannot be interpreted as an integer' )
		if isinstance(lowerCAmelCase    ,						lowerCAmelCase ):
				raise TypeError('\'str\' object cannot be interpreted as an integer' )

		if num == 0:
				return "0b0"

		SCREAMING_SNAKE_CASE_					      =							False

		if num < 0:
				SCREAMING_SNAKE_CASE_					      =							True
				SCREAMING_SNAKE_CASE_					      =							-num

		SCREAMING_SNAKE_CASE_					      =							[]
		while num > 0:
				binary.insert(0    ,						num % 2 )
				num >>= 1

		if negative:
				return "-0b" + "".join(str(lowerCAmelCase ) for e in binary )

		return "0b" + "".join(str(lowerCAmelCase ) for e in binary )


if __name__ == "__main__":
						import doctest

						doctest.testmod()





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