from cva import destroyAllWindows, imread, imshow, waitKey






def        __UpperCAmelCase    (       UpperCAmelCase       )->       Optional[int]:



			"""simple docstring"""







			lowercase		,lowercase							=		img.shape[0], img.shape[1]

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

			return img


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

						# convert to its negative
						A_      =      convert_to_negative(img)

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






from __future__ import annotations

import math






def        __UpperCAmelCase    (       UpperCAmelCase       )->       list[int]:



			"""simple docstring"""







			if num <= 0:
						lowercase							=		f'{num}: Invalid input, please enter a positive integer.'
						raise ValueError(UpperCAmelCase       )

			lowercase							=		[True] * (num + 1)
			lowercase							=		[]
			lowercase							=		2
			lowercase							=		int(math.sqrt(UpperCAmelCase       )       )

			while start <= end:
						# If start is a prime
						if sieve[start] is True:
									prime.append(UpperCAmelCase       )

									# Set multiples of start be False
									for i in range(start * start,		num + 1,		UpperCAmelCase       ):
												if sieve[i] is True:
															lowercase							=		False

						start += 1

			for j in range(end + 1,		num + 1       ):
						if sieve[j] is True:
									prime.append(UpperCAmelCase       )

			return prime


if __name__ == "__main__":
						print(prime_sieve(int(input("Enter a positive integer: ").strip())))





