




from __future__ import annotations







def lowerCamelCase__  (     _lowercase ):

     '''simple docstring'''


     UpperCAmelCase_     :				Optional[int]  =     0.00
     UpperCAmelCase_     :				Tuple  =     0
     for resistor in resistors:
          if resistor <= 0:
               UpperCAmelCase_     :				List[Any]  =     f'''Resistor at index {index} has a negative or zero value!'''
               raise ValueError(_lowercase )
          first_sum += 1 / float(_lowercase )
          index += 1
     return 1 / first_sum







def lowerCamelCase__  (     _lowercase ):

     '''simple docstring'''


     UpperCAmelCase_     :				Tuple  =     0.00
     UpperCAmelCase_     :				str  =     0
     for resistor in resistors:
          sum_r += resistor
          if resistor < 0:
               UpperCAmelCase_     :				Tuple  =     f'''Resistor at index {index} has a negative value!'''
               raise ValueError(_lowercase )
          index += 1
     return sum_r


if __name__ == "__main__":
     import doctest

     doctest.testmod()





def lowerCamelCase__  (     _lowercase					,		_lowercase ):

     '''simple docstring'''


     while a != 0:
          UpperCAmelCase_,       UpperCAmelCase_     :				Optional[int]  =     b % a, a
     return b







def lowerCamelCase__  (     _lowercase					,		_lowercase ):

     '''simple docstring'''


     if gcd(_lowercase					,		_lowercase ) != 1:
          UpperCAmelCase_     :				int  =     f'''mod inverse of {a!r} and {m!r} does not exist'''
          raise ValueError(_lowercase )
     UpperCAmelCase_,       UpperCAmelCase_,       UpperCAmelCase_     :				Union[str, Any]  =     1, 0, a
     UpperCAmelCase_,       UpperCAmelCase_,       UpperCAmelCase_     :				Dict  =     0, 1, m
     while va != 0:
          UpperCAmelCase_     :				List[Any]  =     ua // va
          UpperCAmelCase_,       UpperCAmelCase_,       UpperCAmelCase_,       UpperCAmelCase_,       UpperCAmelCase_,       UpperCAmelCase_     :				Any  =     (ua - q * va), (ua - q * va), (ua - q * va), va, va, va
     return ua % m