


"""simple docstring"""


from __future__ import annotations




def   snake_case		(     UpperCamelCase__       :						Union[str, Any]    )   ->      int:
      if not nums:
            return 0
      lowerCamelCase					:					Union[str, Any]        =	nums[0]
      lowerCamelCase					:					Tuple        =	0
      for num in nums[1:]:
            lowerCamelCase     ,			lowerCamelCase					:					str        =	(
                max_excluding + num,
                max(_SCREAMING_SNAKE_CASE			,				_SCREAMING_SNAKE_CASE    ),
            )
      return max(_SCREAMING_SNAKE_CASE			,				_SCREAMING_SNAKE_CASE    )


if __name__ == "__main__":
    import doctest

    doctest.testmod()








"""simple docstring"""


import unittest

from knapsack import greedy_knapsack as kp


class 			A__	(						unittest.TestCase):


     """simple docstring"""

     def 		a__						(	self:						Optional[int]	)->    Union[str, Any]:
           lowerCamelCase					:					Tuple        =	[10, 20, 30, 40, 50, 60]
           lowerCamelCase					:					Union[str, Any]        =	[2, 4, 6, 8, 10, 12]
           lowerCamelCase					:					Union[str, Any]        =	100
           self.assertEqual(kp.calc_profit(__a     ,		__a     ,		__a	)     ,		210	)

     def 		a__						(	self:						str	)->    str:
           self.assertRaisesRegex(__a     ,		"""max_weight must greater than zero."""	)

     def 		a__						(	self:						str	)->    List[Any]:
           self.assertRaisesRegex(__a     ,		"""Weight can not be negative."""	)

     def 		a__						(	self:						Any	)->    Dict:
           self.assertRaisesRegex(__a     ,		"""Profit can not be negative."""	)

     def 		a__						(	self:						Optional[Any]	)->    List[Any]:
           self.assertRaisesRegex(__a     ,		"""max_weight must greater than zero."""	)







     def 		a__						(	self:						Optional[Any]	)->    Tuple:
           self.assertRaisesRegex(
               __a     ,		"""The length of profit and weight must be same."""	)


if __name__ == "__main__":
    unittest.main()




