

'''simple docstring'''

import cmath
import math




def 				UpperCamelCase(					UpperCAmelCase_  ,	UpperCAmelCase_  ,	UpperCAmelCase_  ,	UpperCAmelCase_     ):
 UpperCAmelCase	:     Dict						 =			math.radians(_lowerCamelCase     )
 UpperCAmelCase	:     Optional[int]						 =			math.radians(_lowerCamelCase     )

 # Convert voltage and current to rectangular form
 UpperCAmelCase	:     Tuple						 =			cmath.rect(_lowerCamelCase  ,	_lowerCamelCase     )
 UpperCAmelCase	:     Optional[Any]						 =			cmath.rect(_lowerCamelCase  ,	_lowerCamelCase     )

 # Calculate apparent power
 return voltage_rect * current_rect


if __name__ == "__main__":
 import doctest

 doctest.testmod()







'''simple docstring'''

def 				UpperCamelCase(					UpperCAmelCase_  ,	UpperCAmelCase_     ):
 while a != 0:
  UpperCAmelCase ,			UpperCAmelCase	:     Tuple						 =			b % a, a
 return b




def 				UpperCamelCase(					UpperCAmelCase_  ,	UpperCAmelCase_     ):
 if gcd(UpperCAmelCase_  ,	UpperCAmelCase_     ) != 1:
  UpperCAmelCase	:     List[str]						 =			F"""mod inverse of {a!r} and {m!r} does not exist"""
  raise ValueError(UpperCAmelCase_     )
 UpperCAmelCase ,			UpperCAmelCase ,			UpperCAmelCase	:     Any						 =			1, 0, a
 UpperCAmelCase ,			UpperCAmelCase ,			UpperCAmelCase	:     Dict						 =			0, 1, m
 while va != 0:
  UpperCAmelCase	:     Tuple						 =			ua // va
  UpperCAmelCase ,			UpperCAmelCase ,			UpperCAmelCase ,			UpperCAmelCase ,			UpperCAmelCase ,			UpperCAmelCase	:     List[Any]						 =			(ua - q * va), (ua - q * va), (ua - q * va), va, va, va
 return ua % m




