




"""simple docstring"""
from cva import destroyAllWindows, imread, imshow, waitKey





def 						UpperCAmelCase				(			A__:    Tuple     )  ->     Union[str, Any]:
			# getting number of pixels in the image
			__lowerCamelCase       ,      __lowerCamelCase					:	Optional[Any]	       =				img.shape[0], img.shape[1]

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

			return img


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

					# convert to its negative
					a_				:    str										=     convert_to_negative(img)

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









"""simple docstring"""
import math





def 						UpperCAmelCase				(			A__:    int = 100     )  ->     int:
			__lowerCamelCase					:	Optional[Any]	       =				sum(i * i for i in range(1							,				n + 1     )     )
			__lowerCamelCase					:	Union[str, Any]	       =				int(math.pow(sum(range(1							,				n + 1     )     )							,				2     )     )
			return square_of_sum - sum_of_squares


if __name__ == "__main__":
					print(F"""{solution() = }""")



