





"""simple docstring"""


from cva import destroyAllWindows, imread, imshow, waitKey





def 							a__			(  _UpperCAmelCase	,     _UpperCAmelCase	)    ->  Any:

 '''simple docstring'''






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

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

 def normalize(_UpperCAmelCase	):
  return min(_UpperCAmelCase	,     2_5_5	)

 for i in range(_UpperCAmelCase	):
  for j in range(_UpperCAmelCase	):
   snake_case__    							=				int(to_grayscale(*img[i][j]	)	)
   snake_case__    							=				[
       normalize(_UpperCAmelCase	),
       normalize(greyscale + factor	),
       normalize(greyscale + 2 * factor	),
   ]

 return img


if __name__ == "__main__":
   # read original image
   a__					:     Union[str, Any]							=				{
       percentage: imread("""image_data/lena.jpg""", 1) for percentage in (1_0, 2_0, 3_0, 4_0)
   }

   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"""


from math import sqrt





def 							a__			(  _UpperCAmelCase	)    ->  list[int]:

 '''simple docstring'''






 snake_case__    							=				[1]
 for i in range(2	,     int(sqrt(_UpperCAmelCase	)	) + 1	,     1	):
  if number % i == 0:
   values.append(_UpperCAmelCase	)
   if int(number // i	) != i:
    values.append(int(number // i	)	)
 return sorted(_UpperCAmelCase	)





def 							a__			(  _UpperCAmelCase	)    ->  bool:

 '''simple docstring'''






 return sum(factors(_UpperCAmelCase	)	) > n





def 							a__			(  _UpperCAmelCase	)    ->  bool:

 '''simple docstring'''






 snake_case__    							=				factors(_UpperCAmelCase	)
 snake_case__    							=				len(_UpperCAmelCase	)
 snake_case__    							=				[[0 for i in range(number + 1	)] for j in range(r + 1	)]
 for i in range(r + 1	):
  snake_case__    							=				True

 for i in range(1	,     number + 1	):
  snake_case__    							=				False

 for i in range(1	,     r + 1	):
  for j in range(1	,     number + 1	):
   if j < values[i - 1]:
    snake_case__    							=				subset[i - 1][j]
   else:
    snake_case__    							=				subset[i - 1][j] or subset[i - 1][j - values[i - 1]]

 return subset[r][number] != 0





def 							a__			(  _UpperCAmelCase	)    ->  bool:

 '''simple docstring'''






 return abundant(_UpperCAmelCase	) and not semi_perfect(_UpperCAmelCase	)


if __name__ == "__main__":
   import doctest

   doctest.testmod(verbose=True)
   for number in (6_9, 7_0, 7_1):
      print(f'''{number} is {'' if weird(number) else 'not '}weird.''')

