






'''simple docstring'''
def 						__SCREAMING_SNAKE_CASE   (					_UpperCamelCase  ,						_UpperCamelCase							):


   """simple docstring"""




   lowercase_		:      str          =       []
   lowercase_		:      List[str]          =       len(_UpperCamelCase							)
   for i in range(_UpperCamelCase							):
      lowercase_		:      List[Any]          =       []
      for j in range(_UpperCamelCase							):
         lowercase_		:      Optional[Any]          =       0
         for k in range(_UpperCamelCase							):
            lowercase_		:      List[str]          =       val + matrix_a[i][k] * matrix_b[k][j]
         list_a.append(_UpperCamelCase							)
      matrix_c.append(_UpperCamelCase							)
   return matrix_c




def 						__SCREAMING_SNAKE_CASE   (					_UpperCamelCase							):


   """simple docstring"""




   return [[int(row == column							) for column in range(_UpperCamelCase							)] for row in range(_UpperCamelCase							)]




def 						__SCREAMING_SNAKE_CASE   (					_UpperCamelCase							):


   """simple docstring"""




   if n <= 1:
      return n
   lowercase_		:      Union[str, Any]          =       identity(2							)
   lowercase_		:      List[Any]          =       [[1, 1], [1, 0]]
   lowercase_		:      Optional[int]          =       n - 1
   while n > 0:
      if n % 2 == 1:
         lowercase_		:      int          =       multiply(_UpperCamelCase  ,						_UpperCamelCase							)
      lowercase_		:      int          =       multiply(_UpperCamelCase  ,						_UpperCamelCase							)
      lowercase_		:      List[str]          =       int(n / 2							)
   return res_matrix[0][0]




def 						__SCREAMING_SNAKE_CASE   (					_UpperCamelCase							):


   """simple docstring"""




   if n <= 1:
      return n
   lowercase_		:      Optional[int]          =       0
   lowercase_		:      Optional[Any]          =       1
   for _ in range(2  ,						n + 1							):
      lowercase_		:      int          =       fiba, fiba + fiba
   return fiba




def 						__SCREAMING_SNAKE_CASE   (					):


   """simple docstring"""




   for ordinal in "0th 1st 2nd 3rd 10th 100th 1000th".split():
      lowercase_		:      Tuple          =       int("".join(c for c in ordinal if c in "0123456789"							)							)  # 1000th --> 1000
      print(
          F"""{ordinal} fibonacci number using matrix exponentiation is """
          F"""{nth_fibonacci_matrix(_UpperCamelCase							)} and using bruteforce is """
          F"""{nth_fibonacci_bruteforce(_UpperCamelCase							)}\n"""							)
   # from timeit import timeit
   # print(timeit("nth_fibonacci_matrix(1000000)",
   #              "from main import nth_fibonacci_matrix", number=5))
   # print(timeit("nth_fibonacci_bruteforce(1000000)",
   #              "from main import nth_fibonacci_bruteforce", number=5))
   # 2.3342058970001744
   # 57.256506615000035


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   main()












'''simple docstring'''
from urllib.error import HTTPError

from bsa import BeautifulSoup
from requests import exceptions, get

UpperCamelCase__	=     'https://www.wellrx.com/prescriptions/{0}/{1}/?freshSearch=true'




def 						__SCREAMING_SNAKE_CASE   (					_UpperCamelCase  ,						_UpperCamelCase							):


   """simple docstring"""




   try:
      # Has user provided both inputs?
      if not drug_name or not zip_code:
         return None

      lowercase_		:      List[str]          =       BASE_URL.format(_UpperCamelCase  ,						_UpperCamelCase							)
      lowercase_		:      Union[str, Any]          =       get(_UpperCamelCase							)

      # Is the response ok?
      response.raise_for_status()

      # Scrape the data using bs4
      lowercase_		:      Any          =       BeautifulSoup(response.text  ,						"html.parser"							)

      # This list will store the name and price.
      lowercase_		:      List[str]          =       []

      # Fetch all the grids that contains the items.
      lowercase_		:      Tuple          =       soup.find_all("div"  ,						{"class": "grid-x pharmCard"}							)
      if grid_list and len(_UpperCamelCase							) > 0:
         for grid in grid_list:
            # Get the pharmacy price.
            lowercase_		:      Tuple          =       grid.find("p"  ,						{"class": "list-title"}							).text

            # Get price of the drug.
            lowercase_		:      List[str]          =       grid.find("span"  ,						{"p", "price price-large"}							).text

            pharmacy_price_list.append(
                {
                    "pharmacy_name": pharmacy_name,
                    "price": price,
                }							)

      return pharmacy_price_list

   except (HTTPError, exceptions.RequestException, ValueError):
      return None


if __name__ == "__main__":
 # Enter a drug name and a zip code
 UpperCamelCase__	=     input('Enter drug name: ').strip()
 UpperCamelCase__	=     input('Enter zip code: ').strip()

 UpperCamelCase__	=     fetch_pharmacy_and_price_list(
     drug_name, zip_code
 )

 if pharmacy_price_list:
  print(f"""\nSearch results for {drug_name} at location {zip_code}:""")
  for pharmacy_price in pharmacy_price_list:
   UpperCamelCase__	=     pharmacy_price['pharmacy_name']
   UpperCamelCase__	=     pharmacy_price['price']

   print(f"""Pharmacy: {name} Price: {price}""")
 else:
  print(f"""No results found for {drug_name}""")




