



import functools



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_  ,					SCREAMING_SNAKE_CASE_					):

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

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

   if len(SCREAMING_SNAKE_CASE_					) == 0:
      return 0

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

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

   lowercase__   					=			set(SCREAMING_SNAKE_CASE_					)

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









from collections import namedtuple

import requests
from lxml import html  # type: ignore

lowercase_						=       namedtuple("""covid_data""", """cases deaths recovered""")



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_ = "https://www.worldometers.info/coronavirus/"					):
			lowercase__   					=			"//div[@class = \"maincounter-number\"]/span/text()"
			return covid_data(*html.fromstring(requests.get(SCREAMING_SNAKE_CASE_					).content					).xpath(SCREAMING_SNAKE_CASE_					)					)


lowercase_						=       """Total COVID-19 cases in the world: {}
Total deaths due to COVID-19 in the world: {}
Total COVID-19 patients recovered in the world: {}"""




print(fmt.format(*covid_stats()))




