"""simple docstring"""






from __future__ import annotations

import typing
from collections import Counter



def SCREAMING_SNAKE_CASE__     (  __UpperCAmelCase					)    ->    Any:
   lowercase__:  typing.Counter[int]   = Counter()
   for base in range(1			,       max_perimeter + 1					):
      for perpendicular in range(snake_case__			,       max_perimeter + 1					):
         lowercase__:  Optional[int]   = (base * base + perpendicular * perpendicular) ** 0.5
         if hypotenuse == int(snake_case__					):
            lowercase__:  Tuple   = int(base + perpendicular + hypotenuse					)
            if perimeter > max_perimeter:
               continue
            triplets[perimeter] += 1
   return triplets



def SCREAMING_SNAKE_CASE__     (  __UpperCAmelCase = 1_0_0_0					)    ->    Optional[Any]:
   lowercase__:  Dict   = pythagorean_triple(snake_case__					)
   return triplets.most_common(1					)[0][0]


if __name__ == "__main__":
       print(f'''Perimeter {solution()} has maximum solutions''')




from PIL import Image




def    a__    (		snake_case__					:							Image						,   snake_case__					:							int     ):
  _UpperCAmelCase		:							Optional[Any]							=     (259 * (level + 255)) / (255 * (259 - level))

  def contrast(snake_case__					:							int     ) -> int:
    return int(128 + factor * (c - 128)     )

  return img.point(snake_case__     )


if __name__ == "__main__":
 # Load image
 with Image.open('image_data/lena.jpg') as img:
  # Change contrast to 170
  SCREAMING_SNAKE_CASE__					:     int       =     change_contrast(img, 170)
  cont_img.save('image_data/lena_high_contrast.png', format='png')





