
import functools






def 	a_		(	__lowercase       :     list[int]	, __lowercase       :     list[int]			)			->  int:

			# Validation
			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'			)

			_snake_case          =      set(__lowercase			)

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

def 	a_		(	__lowercase       :     int = 50_000_000			)			->  int:
			_snake_case          =      set()
			_snake_case          =      int((limit - 24) ** (1 / 2)			)

			_snake_case          =      set(range(3	, prime_square_limit + 1	, 2			)			)
			primes.add(2			)
			for p in range(3	, prime_square_limit + 1	, 2			):
						if p not in primes:
									continue
						primes.difference_update(set(range(p * p	, prime_square_limit + 1	, __lowercase			)			)			)

			for primea in primes:
						_snake_case          =      primea * primea
						for primea in primes:
									_snake_case          =      primea * primea * primea
									if square + cube >= limit - 16:
												break
									for primea in primes:
												_snake_case          =      primea * primea * primea * primea
												_snake_case          =      square + cube + tetr
												if total >= limit:
															break
												ret.add(__lowercase			)

			return len(__lowercase			)


if __name__ == "__main__":
			print(F'{solution() = }')