




'''simple docstring'''






from cva import destroyAllWindows, imread, imshow, waitKey


def  _snake_case       (					A	)						->   Optional[Any]:
							# getting number of pixels in the image
							lowerCAmelCase__       , lowerCAmelCase__	       =     img.shape[0], img.shape[1]

							# converting each pixel's color to its negative
							for i in range(UpperCAmelCase__	):
														for j in range(UpperCAmelCase__	):
																					lowerCAmelCase__	       =     [255, 255, 255] - img[i][j]

							return img


if __name__ == "__main__":
		# read original image
		__UpperCAmelCase       =							imread('''image_data/lena.jpg''', 1)

		# convert to its negative
		__UpperCAmelCase       =							convert_to_negative(img)

		# show result image
		imshow('''negative of original image''', img)
		waitKey(0)
		destroyAllWindows()



'''simple docstring'''






def  _snake_case       (					A = 10	)						->   str:
							if not isinstance(A			,   A	) or n < 0:
														raise ValueError('''Invalid input'''	)
							lowerCAmelCase__	       =     10**n
							lowerCAmelCase__	       =     28433 * (pow(2			,   7830457			,   A	)) + 1
							return str(number % modulus	)


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

		testmod()
		print(f"""{solution(10) = }""")