

from cva import destroyAllWindows, imread, imshow, waitKey

def    A_  (							a  ):

      """simple docstring"""



      SCREAMING_SNAKE_CASE_       ,						SCREAMING_SNAKE_CASE_				:  str           =     img.shape[0], img.shape[1]

      # converting each pixel's color to its negative
      for i in range(a  ):
            for j in range(a  ):
                  SCREAMING_SNAKE_CASE_				:  Union[str, Any]           =     [2_5_5, 2_5_5, 2_5_5] - img[i][j]

      return img


if __name__ == "__main__":
    # read original image
    lowerCAmelCase     :   Dict						     =  imread('image_data/lena.jpg', 1)

    # convert to its negative
    lowerCAmelCase     :   Any						     =  convert_to_negative(img)

    # show result image
    imshow('negative of original image', img)
    waitKey(0)
    destroyAllWindows()









def    A_  (							a  ):

      """simple docstring"""



      SCREAMING_SNAKE_CASE_				:  List[Any]           =     0
      while num > 0:
            digit_sum += num % 1_0
            num //= 1_0
      return digit_sum

def    A_  (							a = 1_0_0  ):

      """simple docstring"""



      SCREAMING_SNAKE_CASE_				:  List[str]           =     1
      SCREAMING_SNAKE_CASE_				:  Union[str, Any]           =     2

      for i in range(2					,   max_n + 1  ):
            SCREAMING_SNAKE_CASE_				:  List[str]           =     pre_numerator
            SCREAMING_SNAKE_CASE_				:  str           =     2 * i // 3 if i % 3 == 0 else 1
            SCREAMING_SNAKE_CASE_				:  Tuple           =     cur_numerator
            SCREAMING_SNAKE_CASE_				:  Tuple           =     e_cont * pre_numerator + temp

      return sum_digits(a  )


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






