
'''simple docstring'''



from __future__ import annotations

import math
from itertools import permutations
def 				lowerCAmelCase_		(			SCREAMING_SNAKE_CASE_  )       ->       bool:




   """simple docstring"""

   if 1 < number < 4:
      # 2 and 3 are primes
      return True
   elif number < 2 or number % 2 == 0 or number % 3 == 0:
      # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
      return False

   # All primes number are in format of 6k +/- 1
   for i in range(5      , int(math.sqrt(SCREAMING_SNAKE_CASE_  ) + 1  )      , 6  ):
      if number % i == 0 or number % (i + 2) == 0:
         return False
   return True
def 				lowerCAmelCase_		(			SCREAMING_SNAKE_CASE_ = 7  )       ->       int:




   """simple docstring"""
   _SCREAMING_SNAKE_CASE       	=			"""""".join(str(SCREAMING_SNAKE_CASE_  ) for i in range(1      , n + 1  )  )
   _SCREAMING_SNAKE_CASE       	=			[int("""""".join(SCREAMING_SNAKE_CASE_  )  ) for i in permutations(SCREAMING_SNAKE_CASE_      , SCREAMING_SNAKE_CASE_  )]
   _SCREAMING_SNAKE_CASE       	=			[num for num in perm_list if is_prime(SCREAMING_SNAKE_CASE_  )]
   return max(SCREAMING_SNAKE_CASE_  ) if pandigitals else 0


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








'''simple docstring'''



from cva import destroyAllWindows, imread, imshow, waitKey
def 				lowerCAmelCase_		(			SCREAMING_SNAKE_CASE_      , SCREAMING_SNAKE_CASE_  )       ->       Dict:




   """simple docstring"""
   _SCREAMING_SNAKE_CASE	,							_SCREAMING_SNAKE_CASE       	=			img.shape[0], img.shape[1]

   def to_grayscale(SCREAMING_SNAKE_CASE_      , SCREAMING_SNAKE_CASE_      , SCREAMING_SNAKE_CASE_  ):
      return 0.2126 * red + 0.587 * green + 0.114 * blue

   def normalize(SCREAMING_SNAKE_CASE_  ):
      return min(SCREAMING_SNAKE_CASE_      , 2_55  )

   for i in range(SCREAMING_SNAKE_CASE_  ):
      for j in range(SCREAMING_SNAKE_CASE_  ):
         _SCREAMING_SNAKE_CASE       	=			int(to_grayscale(*img[i][j]  )  )
         _SCREAMING_SNAKE_CASE       	=			[
             normalize(SCREAMING_SNAKE_CASE_  ),
             normalize(greyscale + factor  ),
             normalize(greyscale + 2 * factor  ),
         ]

   return img


if __name__ == "__main__":
     # read original image
     UpperCamelCase__ :						Optional[int]    							=					{
         percentage: imread("image_data/lena.jpg", 1) for percentage in (10, 20, 30, 40)
     }

     for percentage, img in images.items():
          make_sepia(img, percentage)

     for percentage, img in images.items():
          imshow(f"""Original image with sepia (factor: {percentage})""", img)

     waitKey(0)
     destroyAllWindows()






