
from __future__ import annotations





def 	SCREAMING_SNAKE_CASE__    (      __lowerCAmelCase    ,		__lowerCAmelCase							):
    if b == 0:
        return (1, 0)
    ((snake_case__)						,					(snake_case__))						=				extended_euclid(__lowerCAmelCase    ,		a % b							)
    snake_case__						=				a // b
    return (y, x - k * y)





def 	SCREAMING_SNAKE_CASE__    (      __lowerCAmelCase    ,		__lowerCAmelCase    ,		__lowerCAmelCase    ,		__lowerCAmelCase							):
    ((snake_case__)						,					(snake_case__))						=				extended_euclid(__lowerCAmelCase    ,		__lowerCAmelCase							)
    snake_case__						=				na * na
    snake_case__						=				ra * x * na + ra * y * na
    return (n % m + m) % m





def 	SCREAMING_SNAKE_CASE__    (      __lowerCAmelCase    ,		__lowerCAmelCase							):
    ((snake_case__)						,					(snake_case__))						=				extended_euclid(__lowerCAmelCase    ,		__lowerCAmelCase							)
    if b < 0:
        snake_case__						=				(b % n + n) % n
    return b





def 	SCREAMING_SNAKE_CASE__    (      __lowerCAmelCase    ,		__lowerCAmelCase    ,		__lowerCAmelCase    ,		__lowerCAmelCase							):
    snake_case__						,					snake_case__						=				invert_modulo(__lowerCAmelCase    ,		__lowerCAmelCase							), invert_modulo(__lowerCAmelCase    ,		__lowerCAmelCase							)
    snake_case__						=				na * na
    snake_case__						=				ra * x * na + ra * y * na
    return (n % m + m) % m


if __name__ == "__main__":
     from doctest import testmod

     testmod(name='''chinese_remainder_theorem''', verbose=True)
     testmod(name='''chinese_remainder_theorem2''', verbose=True)
     testmod(name='''invert_modulo''', verbose=True)
     testmod(name='''extended_euclid''', verbose=True)





from __future__ import annotations





def 	SCREAMING_SNAKE_CASE__    (      __lowerCAmelCase    ,		__lowerCAmelCase    ,		__lowerCAmelCase							):
    if (voltage, current, resistance).count(0							) != 1:
        raise ValueError("One and only one argument must be 0"							)
    if resistance < 0:
        raise ValueError("Resistance cannot be negative"							)
    if voltage == 0:
        return {"voltage": float(current * resistance							)}
    elif current == 0:
        return {"current": voltage / resistance}
    elif resistance == 0:
        return {"resistance": voltage / current}
    else:
        raise ValueError("Exactly one argument must be 0"							)


if __name__ == "__main__":
     import doctest

     doctest.testmod()



