

'''simple docstring'''





from PIL import Image





def      lowerCAmelCase_    ( snake_case_	:			Dict ,   snake_case_	:			Union[str, Any]      )   ->				Image:


     '''simple docstring'''




     UpperCAmelCase_	   =       (2_59 * (level + 2_55)) / (2_55 * (2_59 - level))

     def contrast(snake_case_	:			Dict      ) -> int:
          return int(1_28 + factor * (c - 1_28)      )

     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_:					str  =change_contrast(img, 1_70)
        cont_img.save('image_data/lena_high_contrast.png', format='png')





'''simple docstring'''





def      lowerCAmelCase_    ( snake_case_	:			int = 1_00_00_00      )   ->				int:


     '''simple docstring'''




     UpperCAmelCase_	   =       limit + 1
     UpperCAmelCase_	   =       [0] * limit
     for first_term in range(1 ,   snake_case_      ):
          for n in range(snake_case_ ,   snake_case_ ,   snake_case_      ):
               UpperCAmelCase_	   =       first_term + n / first_term
               if common_difference % 4:  # d must be divisble by 4
                    continue
               else:
                    common_difference /= 4
                    if (
                        first_term > common_difference
                        and first_term < 4 * common_difference
                    ):  # since x,y,z are positive integers
                         frequency[n] += 1  # so z>0 and a>d ,also 4d<a

     UpperCAmelCase_	   =       sum(1 for x in frequency[1:limit] if x == 10      )

     return count


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




