

"""simple docstring"""




def 	A       (     snake_case__		,				snake_case__		,				snake_case__    ):




			'''simple docstring'''


			if n == 0:
						return 1

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

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


# a prime number
A_							:			Optional[int]											= 701

A_							:			int											= 1_000_000_000
A_							:			Tuple											= 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)





"""simple docstring"""




def 	A       (     snake_case__    ):




			'''simple docstring'''


			if not nums:  # Makes sure that the list is not empty
						raise ValueError("""List is empty"""    )

			SCREAMING_SNAKE_CASE__								=      sum(snake_case__    ) / len(snake_case__    )  # Calculate the average
			return sum(abs(x - average    ) for x in nums    ) / len(snake_case__    )


if __name__ == "__main__":
						import doctest

						doctest.testmod()


