


'''simple docstring'''






import colorsys

from PIL import Image  # type: ignore





def      UpperCAmelCase      (		lowerCamelCase_  :float				,      lowerCamelCase_  :float				,      lowerCamelCase_  :int ):







		'''simple docstring'''
		snake_case_		:							Union[str, Any]			       =						x
		snake_case_		:							int			       =						y
		for step in range(UpperCAmelCase__ ):  # noqa: B007
				snake_case_		:							Tuple			       =						a * a - b * b + x
				snake_case_		:							int			       =						2 * a * b + y
				snake_case_		:							List[str]			       =						a_new

				# divergence happens for all complex number with an absolute value
				# greater than 4
				if a * a + b * b > 4:
						break
		return step / (max_step - 1)





def      UpperCAmelCase      (		lowerCamelCase_  :float ):







		'''simple docstring'''
		if distance == 1:
				return (0, 0, 0)
		else:
				return (2_55, 2_55, 2_55)





def      UpperCAmelCase      (		lowerCamelCase_  :float ):







		'''simple docstring'''
		if distance == 1:
				return (0, 0, 0)
		else:
				return tuple(round(i * 2_55 ) for i in colorsys.hsv_to_rgb(UpperCAmelCase__				,      1				,      1 ) )





def      UpperCAmelCase      (		lowerCamelCase_  :int = 8_00				,      lowerCamelCase_  :int = 6_00				,      lowerCamelCase_  :float = -0.6				,      lowerCamelCase_  :float = 0				,      lowerCamelCase_  :float = 3.2				,      lowerCamelCase_  :int = 50				,      lowerCamelCase_  :bool = True				,      ):







		'''simple docstring'''
		snake_case_		:							str			       =						Image.new("""RGB"""				,      (image_width, image_height) )
		snake_case_		:							int			       =						img.load()

		# loop through the image-coordinates
		for image_x in range(UpperCAmelCase__ ):
				for image_y in range(UpperCAmelCase__ ):
						# determine the figure-coordinates based on the image-coordinates
						snake_case_		:							Dict			       =						figure_width / image_width * image_height
						snake_case_		:							Any			       =						figure_center_x + (image_x / image_width - 0.5) * figure_width
						snake_case_		:							Optional[int]			       =						figure_center_y + (image_y / image_height - 0.5) * figure_height

						snake_case_		:							List[Any]			       =						get_distance(UpperCAmelCase__				,      UpperCAmelCase__				,      UpperCAmelCase__ )

						# color the corresponding pixel based on the selected coloring-function
						if use_distance_color_coding:
								snake_case_		:							Union[str, Any]			       =						get_color_coded_rgb(UpperCAmelCase__ )
						else:
								snake_case_		:							Optional[Any]			       =						get_black_and_white_rgb(UpperCAmelCase__ )

		return img


if __name__ == "__main__":
							import doctest

							doctest.testmod()

							# colored version, full figure
							__A	:	Dict     =     get_image()

							# uncomment for colored version, different section, zoomed in
							# img = get_image(figure_center_x = -0.6, figure_center_y = -0.4,
							# figure_width = 0.8)

							# uncomment for black and white version, full figure
							# img = get_image(use_distance_color_coding = False)

							# uncomment to save the image
							# img.save("mandelbrot.png")

							img.show()



'''simple docstring'''






import math





def      UpperCAmelCase      (		lowerCamelCase_  :list				,      lowerCamelCase_  :int ):







		'''simple docstring'''
		snake_case_		:							Union[str, Any]			       =						len(lowerCamelCase_ )
		snake_case_		:							List[Any]			       =						int(math.floor(math.sqrt(lowerCamelCase_ ) ) )
		snake_case_		:							str			       =						0
		while arr[min(lowerCamelCase_				,      lowerCamelCase_ ) - 1] < x:
				snake_case_		:							Any			       =						step
				step += int(math.floor(math.sqrt(lowerCamelCase_ ) ) )
				if prev >= n:
						return -1

		while arr[prev] < x:
				snake_case_		:							Optional[Any]			       =						prev + 1
				if prev == min(lowerCamelCase_				,      lowerCamelCase_ ):
						return -1
		if arr[prev] == x:
				return prev
		return -1


if __name__ == "__main__":
							__A	:	Any     =     input('Enter numbers separated by a comma:\n').strip()
							__A	:	Union[str, Any]     =     [int(item) for item in user_input.split(',')]
							__A	:	Optional[int]     =     int(input('Enter the number to be searched:\n'))
							__A	:	int     =     jump_search(arr, x)
							if res == -1:
														print('Number not found!')
							else:
														print(F'Number {x} is at index {res}')