


def 							UpperCamelCase_( lowerCamelCase_				,					lowerCamelCase_				,					lowerCamelCase_					)       ->		List[str]:
    if n == 0:
        return 1

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

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


# a prime number
SCREAMING_SNAKE_CASE			: str				   =					701

SCREAMING_SNAKE_CASE			: Optional[int]				   =					1000000000
SCREAMING_SNAKE_CASE			: Optional[int]				   =					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 maths.prime_factors import prime_factors



def 							UpperCamelCase_( lowerCamelCase_					)       ->		int:
    if not isinstance(lowerCamelCase_				,					lowerCamelCase_					):
        _lowercase			:				str 						=						F'''Input value of [number={number}] must be an integer'''
        raise TypeError(lowerCamelCase_					)
    if number < 1:
        raise ValueError('Input must be a positive integer'					)
    return -1 if len(prime_factors(lowerCamelCase_					)					) % 2 else 1


if __name__ == "__main__":
 import doctest

 doctest.testmod()


