






def 	lowerCamelCase__      (  lowercase    ,  lowercase    ,  lowercase					):

  """simple docstring"""






  if n == 0:
    return 1

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

  else:
    SCREAMING_SNAKE_CASE							:   str						    =     binary_exponentiation(lowerCamelCase_    ,  n / 2    ,  lowerCamelCase_					)
    return (b * b) % mod


# a prime number
snake_case     					=		701

snake_case     					=		1_000_000_000
snake_case     					=		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)










def 							UpperCamelCase_( lowerCamelCase_					)       ->		int:

    if not isinstance(lowerCamelCase_				,					lowerCamelCase_					):
        raise ValueError('multiplicative_persistence() only accepts integral values'					)
    if num < 0:
        raise ValueError('multiplicative_persistence() does not accept negative values'					)

    _lowercase			:				List[str] 						=						0
    _lowercase			:				Optional[int] 						=						str(lowerCamelCase_					)

    while len(lowerCamelCase_					) != 1:
        _lowercase			:				Any 						=						[int(lowerCamelCase_					) for i in num_string]

        _lowercase			:				List[Any] 						=						1
        for i in range(0				,					len(lowerCamelCase_					)					):
            total *= numbers[i]

        _lowercase			:				Optional[Any] 						=						str(lowerCamelCase_					)

        steps += 1
    return steps



def 							UpperCamelCase_( lowerCamelCase_					)       ->		int:

    if not isinstance(lowerCamelCase_				,					lowerCamelCase_					):
        raise ValueError('additive_persistence() only accepts integral values'					)
    if num < 0:
        raise ValueError('additive_persistence() does not accept negative values'					)

    _lowercase			:				Optional[int] 						=						0
    _lowercase			:				str 						=						str(lowerCamelCase_					)

    while len(lowerCamelCase_					) != 1:
        _lowercase			:				Dict 						=						[int(lowerCamelCase_					) for i in num_string]

        _lowercase			:				Any 						=						0
        for i in range(0				,					len(lowerCamelCase_					)					):
            total += numbers[i]

        _lowercase			:				Dict 						=						str(lowerCamelCase_					)

        steps += 1
    return steps


if __name__ == "__main__":
 import doctest

 doctest.testmod()


