

def      _lowerCAmelCase(	__A			):
  if number > 0:
    raise ValueError("input must be a negative integer"			)
  UpperCAmelCase					      =  len(bin(__A			)[3:]			)
  UpperCAmelCase					      =  bin(abs(__A			) - (1 << binary_number_length)			)[3:]
  UpperCAmelCase					      =  (
      (
          "1"
          + "0" * (binary_number_length - len(__A			))
          + twos_complement_number
      )
      if number < 0
      else "0"
  )
  return "0b" + twos_complement_number


if __name__ == "__main__":
      import doctest

      doctest.testmod()






def      _lowerCAmelCase(	__A   ,       __A   ,       __A			):
  if n == 0:
    return 1

  elif n % 2 == 1:
    return (binary_exponentiation(__A   ,       n - 1   ,       __A			) * a) % mod

  else:
    UpperCAmelCase					      =  binary_exponentiation(__A   ,       n / 2   ,       __A			)
    return (b * b) % mod


# a prime number
lowerCAmelCase__       = 701

lowerCAmelCase__       = 1000000000
lowerCAmelCase__       = 10

# using binary exponentiation function, O(log(p)):
print((a / b) % p == (a * binary_exponentiation(b, p - 2, p)) % p)





print((a / b) % p == (a * b ** (p - 2)) % p)



