

'''simple docstring'''



from cva import destroyAllWindows, imread, imshow, waitKey


def       snake_case   (	snake_case      : Tuple			) ->  int:


    """simple docstring"""


    lowerCAmelCase						,   lowerCAmelCase 						=							img.shape[0], img.shape[1]

    # converting each pixel's color to its negative
    for i in range(snake_case			):
        for j in range(snake_case			):
            lowerCAmelCase 						=							[255, 255, 255] - img[i][j]

    return img


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

     # convert to its negative
     _UpperCamelCase						:  int							       =				convert_to_negative(img)

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








'''simple docstring'''



def       snake_case   (	snake_case      : int					,		snake_case      : int					,		snake_case      : int			) ->  int:


    """simple docstring"""


    if exponent == 1:
        return base
    if exponent % 2 == 0:
        lowerCAmelCase 						=							_modexpt(snake_case					,		exponent // 2					,		snake_case			) % modulo_value
        return (x * x) % modulo_value
    else:
        return (base * _modexpt(snake_case					,		exponent - 1					,		snake_case			)) % modulo_value


def       snake_case   (	snake_case      : int = 1777					,		snake_case      : int = 1855					,		snake_case      : int = 8			) ->  int:


    """simple docstring"""


    lowerCAmelCase 						=							base
    for _ in range(1					,		snake_case			):
        lowerCAmelCase 						=							_modexpt(snake_case					,		snake_case					,		10**digits			)

    return result


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





