





from __future__ import annotations

UpperCAmelCase_											=       [True] * 1000001
UpperCAmelCase_											=       2
while i * i <= 1000000:
					if seive[i]:
										for j in range(i * i, 1000001, i):
															UpperCAmelCase_											=       False
					i += 1





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	bool:



					'''simple docstring'''




					return seive[n]





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	bool:



					'''simple docstring'''




					return any(digit in '02468' for digit in str(UpperCamelCase__  )  )





def   lowerCamelCase__       (       UpperCamelCase__     :    int = 1_000_000  )     ->	list[int]:



					'''simple docstring'''




					_snake_case													=			[2]  # result already includes the number 2.
					for num in range(3    ,      limit + 1    ,      2  ):
										if is_prime(UpperCamelCase__  ) and not contains_an_even_digit(UpperCamelCase__  ):
															_snake_case													=			str(UpperCamelCase__  )
															_snake_case													=			[int(str_num[j:] + str_num[:j]  ) for j in range(len(UpperCamelCase__  )  )]
															if all(is_prime(UpperCamelCase__  ) for i in list_nums  ):
																				result.append(UpperCamelCase__  )
					return result





def   lowerCamelCase__       (       )     ->	int:



					'''simple docstring'''




					return len(find_circular_primes()  )


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










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()



