

"""simple docstring"""





from __future__ import annotations




def   _A  (  UpperCamelCase_     :       list[int])	->						int:
   '''simple docstring'''


   if not nums:
      return 0
   __lowercase								=						nums[0]
   __lowercase								=						0
   for num in nums[1:]:
      __lowercase		,__lowercase								=						(
          max_excluding + num,
          max(UpperCamelCase_,			UpperCamelCase_),
      )
   return max(UpperCamelCase_,			UpperCamelCase_)


if __name__ == "__main__":
   import doctest

   doctest.testmod()







"""simple docstring"""





from collections.abc import Sequence




def   _A  (  UpperCamelCase_     :       Sequence[float],			UpperCamelCase_     :       float)	->						float:
   '''simple docstring'''


   return sum(c * (x**i) for i, c in enumerate(UpperCamelCase_))




def   _A  (  UpperCamelCase_     :       Sequence[float],			UpperCamelCase_     :       float)	->						float:
   '''simple docstring'''


   __lowercase								=						0.0
   for coeff in reversed(UpperCamelCase_):
      __lowercase								=						result * x + coeff
   return result


if __name__ == "__main__":
   _a       =							(0.0, 0.0, 5.0, 9.3, 7.0)
   _a       =							10.0
   print(evaluate_poly(poly, x))
   print(horner(poly, x))




