

def 						_snake_case		(     SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE					)							->   Optional[int]:

     """simple docstring"""







     if n == 0:
          return 1

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

     else:
          _lowerCAmelCase :       Any	   =     binary_exponentiation(SCREAMING_SNAKE_CASE		,				n / 2					)
          return b * b


if __name__ == "__main__":
  try:
    __UpperCAmelCase     					=  int(input('Enter Base : ').strip())
    __UpperCAmelCase     					=  int(input('Enter Power : ').strip())
  except ValueError:
    print('Invalid literal for integer')

  __UpperCAmelCase     					=  binary_exponentiation(BASE, POWER)
  print(f'''{BASE}^({POWER}) : {RESULT}''')









def 						_snake_case		(     SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE					)							->   Optional[int]:

     """simple docstring"""







     if power < 0:
          return -1
     base %= mod
     _lowerCAmelCase :       Tuple	   =     1

     while power > 0:
          if power & 1:
               _lowerCAmelCase :       Optional[Any]	   =     (result * base) % mod
          _lowerCAmelCase :       int	   =     power >> 1
          _lowerCAmelCase :       Optional[int]	   =     (base * base) % mod

     return result







def 						_snake_case		(     )							->   Optional[int]:

     """simple docstring"""







     print(modular_exponential(3		,				200		,				13					)					)


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  main()






