

def        UpperCAmelCase_     (		_A   ,	_A   ,	_A       ):





     '''simple docstring'''




     if n == 0:
          return 1

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

     else:
          SCREAMING_SNAKE_CASE__					=					binary_exponentiation(_A   ,	n / 2   ,	_A       )
          return (b * b) % mod


# a prime number
_SCREAMING_SNAKE_CASE  :						Any         =    701

_SCREAMING_SNAKE_CASE  :						Dict         =    1000000000
_SCREAMING_SNAKE_CASE  :						List[Any]         =    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)





from collections.abc import Callable

import numpy as np
def        UpperCAmelCase_     (		_A   ,	_A   ,	_A   ,	_A   ,	_A       ):





     '''simple docstring'''




     SCREAMING_SNAKE_CASE__					=					int(np.ceil((x_end - xa) / step_size       )       )
     SCREAMING_SNAKE_CASE__					=					np.zeros((n + 1,)       )
     SCREAMING_SNAKE_CASE__					=					ya
     SCREAMING_SNAKE_CASE__					=					xa

     for k in range(_A       ):
          SCREAMING_SNAKE_CASE__					=					y[k] + step_size * ode_func(_A   ,	y[k]       )
          SCREAMING_SNAKE_CASE__					=					y[k] + (
              (step_size / 2) * (ode_func(_A   ,	y[k]       ) + ode_func(x + step_size   ,	_A       ))
          )
          x += step_size

     return y


if __name__ == "__main__":
       import doctest

       doctest.testmod()


