


from __future__ import annotations







def   lowerCamelCase(      a__		,a__		,a__):
				assert n > 1 and a > 0 and greatest_common_divisor(a__		,a__) == 1
				((_SCREAMING_SNAKE_CASE)     , (_SCREAMING_SNAKE_CASE)     , (_SCREAMING_SNAKE_CASE))	     =extended_gcd(a__		,a__)  # Implemented below
				_SCREAMING_SNAKE_CASE	     =(b * s) % n
				return x







def   lowerCamelCase(      a__		,a__):
				((_SCREAMING_SNAKE_CASE)     , (_SCREAMING_SNAKE_CASE))	     =extended_euclid(a__		,a__)  # Implemented below
				if b < 0:
								_SCREAMING_SNAKE_CASE	     =(b % n + n) % n
				return b







def   lowerCamelCase(      a__		,a__		,a__):
				_SCREAMING_SNAKE_CASE	     =invert_modulo(a__		,a__)
				_SCREAMING_SNAKE_CASE	     =(b * s) % n
				return x







def   lowerCamelCase(      a__		,a__):
				assert a >= 0 and b >= 0

				if b == 0:
								_SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE	     =a, 1, 0
				else:
								((_SCREAMING_SNAKE_CASE)     , (_SCREAMING_SNAKE_CASE)     , (_SCREAMING_SNAKE_CASE))	     =extended_gcd(a__		,a % b)
								_SCREAMING_SNAKE_CASE	     =q
								_SCREAMING_SNAKE_CASE	     =p - q * (a // b)

				assert a % d == 0 and b % d == 0
				assert d == a * x + b * y

				return (d, x, y)







def   lowerCamelCase(      a__		,a__):
				if b == 0:
								return (1, 0)
				((_SCREAMING_SNAKE_CASE)     , (_SCREAMING_SNAKE_CASE))	     =extended_euclid(a__		,a % b)
				_SCREAMING_SNAKE_CASE	     =a // b
				return (y, x - k * y)







def   lowerCamelCase(      a__		,a__):
				if a < b:
								_SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE	     =b, a

				while a % b != 0:
								_SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE	     =b, a % b

				return b


if __name__ == "__main__":
							from doctest import testmod

							testmod(name='''modular_division''', verbose=True)
							testmod(name='''modular_division2''', verbose=True)
							testmod(name='''invert_modulo''', verbose=True)
							testmod(name='''extended_gcd''', verbose=True)
							testmod(name='''extended_euclid''', verbose=True)
							testmod(name='''greatest_common_divisor''', verbose=True)



from __future__ import annotations

from collections.abc import Callable







def   lowerCamelCase(      a__		,a__		,a__		,a__ = 100		,):
				_SCREAMING_SNAKE_CASE	     =x_start
				_SCREAMING_SNAKE_CASE	     =fnc(a__)
				_SCREAMING_SNAKE_CASE	     =0.0

				for _ in range(a__):
								# Approximates small segments of curve as linear and solve
								# for trapezoidal area
								_SCREAMING_SNAKE_CASE	     =(x_end - x_start) / steps + xa
								_SCREAMING_SNAKE_CASE	     =fnc(a__)
								area += abs(fxa + fxa) * (xa - xa) / 2

								# Increment step
								_SCREAMING_SNAKE_CASE	     =xa
								_SCREAMING_SNAKE_CASE	     =fxa
				return area


if __name__ == "__main__":







							def   lowerCamelCase(      a__):
											return x**3

							print('''f(x) = x^3''')
							print('''The area between the curve, x = -10, x = 10 and the x axis is:''')
							snake_case_  :	Any							  =							10
							while i <= 10_00_00:
														snake_case_  :	Tuple							  =							trapezoidal_area(f, -5, 5, i)
														print(f"""with {i} steps: {area}""")
														i *= 10