



'''simple docstring'''





from cva import destroyAllWindows, imread, imshow, waitKey

def  a_  (							_lowerCAmelCase ,_lowerCAmelCase )   ->   int:
  __lowerCamelCase ,__lowerCamelCase : Optional[Any]					 =				img.shape[0], img.shape[1]

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

  def normalize(_lowerCAmelCase ):
    return min(_lowerCAmelCase ,255 )

  for i in range(_lowerCAmelCase ):
    for j in range(_lowerCAmelCase ):
      __lowerCamelCase : str					 =				int(to_grayscale(*img[i][j] ) )
      __lowerCamelCase : Dict					 =				[
          normalize(_lowerCAmelCase ),
          normalize(greyscale + factor ),
          normalize(greyscale + 2 * factor ),
      ]

  return img


if __name__ == "__main__":
   # read original image
   _UpperCamelCase							       =		{
       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()











'''simple docstring'''





import decimal

def  a_  (							)   ->   int:
  __lowerCamelCase : int					 =				0
  __lowerCamelCase : Any					 =				decimal.Context(prec=105 )
  for i in range(2 ,100 ):
    __lowerCamelCase : str					 =				decimal.Decimal(_lowerCAmelCase )
    __lowerCamelCase : int					 =				number.sqrt(_lowerCAmelCase )
    if len(str(_lowerCAmelCase ) ) > 1:
      answer += int(str(_lowerCAmelCase )[0] )
      __lowerCamelCase : List[str]					 =				str(_lowerCAmelCase )[2:101]
      answer += sum(int(_lowerCAmelCase ) for x in sqrt_number_str )
  return answer


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   print(f'''{solution() = }''')






