





'''simple docstring'''







import functools





def   _lowerCAmelCase		(		lowercase   ,      lowercase      )   ->   int:

			if not isinstance(lowercase   ,      lowercase      ) or not all(isinstance(lowercase   ,      lowercase      ) for day in days      ):
						raise ValueError("""The parameter days should be a list of integers"""      )

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

			if len(lowercase      ) == 0:
						return 0

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

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

			__lowerCAmelCase   		=							set(lowercase      )

			@functools.cache
			def dynamic_programming(lowercase      ) -> 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()








'''simple docstring'''

def    a__							(							lowercase   :	str )						->						int:





     """simple docstring"""

     assert column_title.isupper()
     _UpperCamelCase							       =			0
     _UpperCamelCase							       =			len(lowercase ) - 1
     _UpperCamelCase							       =			0

     while index >= 0:
          _UpperCamelCase							       =			(ord(column_title[index] ) - 64) * pow(26,   lowercase )
          answer += value
          power += 1
          index -= 1

     return answer


if __name__ == "__main__":
   from doctest import testmod

   testmod()



