



'''simple docstring'''

import unittest

from knapsack import knapsack as k

class __snake_case(				unittest.TestCase ):


						'''simple docstring'''



						def     __snake_case   ( self				)     ->     str:
							lowerCAmelCase   =     0
							lowerCAmelCase   =     [0]
							lowerCAmelCase   =     [0]
							lowerCAmelCase   =     len(A_				)
							self.assertEqual(k.knapsack(A_     ,	A_     ,	A_     ,	A_				)     ,	0				)

							lowerCAmelCase   =     [60]
							lowerCAmelCase   =     [10]
							lowerCAmelCase   =     len(A_				)
							self.assertEqual(k.knapsack(A_     ,	A_     ,	A_     ,	A_				)     ,	0				)


						def     __snake_case   ( self				)     ->     Union[str, Any]:
							lowerCAmelCase   =     3
							lowerCAmelCase   =     [1, 2, 3]
							lowerCAmelCase   =     [3, 2, 1]
							lowerCAmelCase   =     len(A_				)
							self.assertEqual(k.knapsack(A_     ,	A_     ,	A_     ,	A_				)     ,	5				)




						def     __snake_case   ( self				)     ->     Optional[Any]:
							lowerCAmelCase   =     50
							lowerCAmelCase   =     [60, 100, 120]
							lowerCAmelCase   =     [10, 20, 30]
							lowerCAmelCase   =     len(A_				)
							self.assertEqual(k.knapsack(A_     ,	A_     ,	A_     ,	A_				)     ,	220				)


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




'''simple docstring'''

import cmath
import math






def 		_snake_case		( _SCREAMING_SNAKE_CASE					:						float							,		_SCREAMING_SNAKE_CASE					:						float							,		_SCREAMING_SNAKE_CASE					:						float							,		_SCREAMING_SNAKE_CASE					:						float							)      ->						complex:







	"""simple docstring"""
	lowerCAmelCase   =     math.radians(_SCREAMING_SNAKE_CASE							)
	lowerCAmelCase   =     math.radians(_SCREAMING_SNAKE_CASE							)

	# Convert voltage and current to rectangular form
	lowerCAmelCase   =     cmath.rect(_SCREAMING_SNAKE_CASE							,		_SCREAMING_SNAKE_CASE							)
	lowerCAmelCase   =     cmath.rect(_SCREAMING_SNAKE_CASE							,		_SCREAMING_SNAKE_CASE							)

	# Calculate apparent power
	return voltage_rect * current_rect


if __name__ == "__main__":
				import doctest

				doctest.testmod()