


import functools







def        SCREAMING_SNAKE_CASE_						(			__A :			List[Any]  ,    __A :			List[str]				)	->		Tuple:

       """simple docstring"""

       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__				) >= 3_66:
              raise ValueError('All days elements should be less than 366'				)

       a_					:		List[Any]							=  set(lowerCamelCase__				)

       @functools.cache
       def dynamic_programming(__A :			Union[str, Any]				) -> int:
              if index > 3_65:
                     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()







'''simple docstring'''




import re



def 	a			( lowerCamelCase__    ):
			'''simple docstring'''





			return [char.split() for char in re.split(r"""[^ a-z A-Z 0-9 \s]"""						,      str_    )]



def 	a			( lowerCamelCase__    ):
			'''simple docstring'''





			A_	:						Optional[int]	=     split_input(str_    )
			return "".join(
			    ["""""".join([char.capitalize() for char in sub_str]    ) for sub_str in string_split]    )



def 	a			( lowerCamelCase__						,      lowerCamelCase__						,      lowerCamelCase__    ):
			'''simple docstring'''





			try:
						A_	:						List[Any]	=     split_input(lowerCamelCase__    )
						if upper:
									A_	:						Tuple	=     """""".join(
									    [
									        separator.join([char.upper() for char in sub_str]    )
									        for sub_str in string_split
									    ]    )
						else:
									A_	:						Optional[int]	=     """""".join(
									    [
									        separator.join([char.lower() for char in sub_str]    )
									        for sub_str in string_split
									    ]    )
						return res_str
			except IndexError:
						return "not valid string"



def 	a			( lowerCamelCase__    ):
			'''simple docstring'''





			return to_simple_case(lowerCamelCase__    )



def 	a			( lowerCamelCase__    ):
			'''simple docstring'''





			try:
						A_	:						Tuple	=     to_simple_case(lowerCamelCase__    )
						return res_str[0].lower() + res_str[1:]
			except IndexError:
						return "not valid string"



def 	a			( lowerCamelCase__						,      lowerCamelCase__    ):
			'''simple docstring'''





			return to_complex_case(lowerCamelCase__						,      lowerCamelCase__						,      """_"""    )



def 	a			( lowerCamelCase__						,      lowerCamelCase__    ):
			'''simple docstring'''





			return to_complex_case(lowerCamelCase__						,      lowerCamelCase__						,      """-"""    )


if __name__ == "__main__":
						__import__('''doctest''').testmod()