
'''simple docstring'''







from __future__ import annotations

from cmath import sqrt
def 					snake_case_		(				__SCREAMING_SNAKE_CASE					: int      ,      __SCREAMING_SNAKE_CASE					: int      ,      __SCREAMING_SNAKE_CASE					: int							):



						"""simple docstring"""





						if a == 0:
												raise ValueError('''Coefficient \'a\' must not be zero.'''							)
						lowercase_	:     List[Any]													=       b * b - 4 * a * c

						lowercase_	:     Dict													=       (-b + sqrt(__SCREAMING_SNAKE_CASE							)) / (2 * a)
						lowercase_	:     Tuple													=       (-b - sqrt(__SCREAMING_SNAKE_CASE							)) / (2 * a)

						return (
						    root_a.real if not root_a.imag else root_a,
						    root_a.real if not root_a.imag else root_a,
						)
def 					snake_case_		(				):



						"""simple docstring"""





						lowercase_						, lowercase_	:     Any													=       quadratic_roots(a=5      ,      b=6      ,      c=1							)
						print(F'''The solutions are: {solutiona} and {solutiona}'''							)


if __name__ == "__main__":
							main()





'''simple docstring'''







import unittest

from knapsack import greedy_knapsack as kp






class  lowerCAmelCase__   (  unittest.TestCase     ):






					def 	_snake_case    (   self		):


											"""simple docstring"""





											lowercase_	:     List[str]													=       [10, 20, 30, 40, 50, 60]
											lowercase_	:     Optional[Any]													=       [2, 4, 6, 8, 10, 12]
											lowercase_	:     Union[str, Any]													=       1_00
											self.assertEqual(kp.calc_profit(__SCREAMING_SNAKE_CASE				,							__SCREAMING_SNAKE_CASE				,							__SCREAMING_SNAKE_CASE		)				,							2_10		)






					def 	_snake_case    (   self		):


											"""simple docstring"""





											self.assertRaisesRegex(__SCREAMING_SNAKE_CASE				,							'''max_weight must greater than zero.'''		)






					def 	_snake_case    (   self		):


											"""simple docstring"""





											self.assertRaisesRegex(__SCREAMING_SNAKE_CASE				,							'''Weight can not be negative.'''		)






					def 	_snake_case    (   self		):


											"""simple docstring"""





											self.assertRaisesRegex(__SCREAMING_SNAKE_CASE				,							'''Profit can not be negative.'''		)






					def 	_snake_case    (   self		):


											"""simple docstring"""





											self.assertRaisesRegex(__SCREAMING_SNAKE_CASE				,							'''max_weight must greater than zero.'''		)






					def 	_snake_case    (   self		):


											"""simple docstring"""





											self.assertRaisesRegex(
											    __SCREAMING_SNAKE_CASE				,							'''The length of profit and weight must be same.'''		)


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



