





from __future__ import annotations

from functools import lru_cache
from math import ceil

UpperCAmelCase_ 							=       100

UpperCAmelCase_ 							=       set(range(3, NUM_PRIMES, 2))
primes.add(2)
UpperCAmelCase_ 							=       42

for prime in range(3, ceil(NUM_PRIMES**0.5), 2):
					if prime not in primes:
										continue
					primes.difference_update(set(range(prime * prime, NUM_PRIMES, prime)))





@lru_cache(maxsize=100  )
def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	set[int]:



					'''simple docstring'''




					if number_to_partition < 0:
										return set()
					elif number_to_partition == 0:
										return {1}

					_snake_case													=			set()
					_snake_case													=			42
					_snake_case													=			42

					for prime in primes:
										if prime > number_to_partition:
															continue
										for sub in partition(number_to_partition - prime  ):
															ret.add(sub * prime  )

					return ret





def   lowerCamelCase__       (       UpperCamelCase__     :    int = 5_000  )     ->	int | None:



					'''simple docstring'''




					for number_to_partition in range(1    ,      UpperCamelCase__  ):
										if len(partition(UpperCamelCase__  )  ) > number_unique_partitions:
															return number_to_partition
					return None


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










from cva import destroyAllWindows, imread, imshow, waitKey





def   lowerCamelCase__       (       UpperCamelCase__     :    Dict  )     ->	Optional[Any]:



					'''simple docstring'''




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

					# converting each pixel's color to its negative
					for i in range(UpperCamelCase__  ):
										for j in range(UpperCamelCase__  ):
															_snake_case													=			[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()



