

from __future__ import annotations






def 					lowerCamelCase_     (							UpperCAmelCase_							:     list	)						->				float:




	'''simple docstring'''




	if not nums:
		raise ValueError('List is empty'	)
	return sum(UpperCAmelCase_	) / len(UpperCAmelCase_	)


if __name__ == "__main__":
							import doctest

							doctest.testmod()







import functools






def 					lowerCamelCase_     (							UpperCAmelCase_							:     list[int]							,       UpperCAmelCase_							:     list[int]	)						->				int:




	'''simple docstring'''




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

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

	if len(UpperCAmelCase_	) == 0:
		return 0

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

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

	_UpperCamelCase   :		Union[str, Any]			=						set(UpperCAmelCase_	)

	@functools.cache
	def dynamic_programming(UpperCAmelCase_							:     int	) -> int:
		if index > 3_6_5:
			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 + 3_0	)							,       )

	return dynamic_programming(1	)


if __name__ == "__main__":
							import doctest

							doctest.testmod()




