
"""simple docstring"""

from __future__ import annotations






def 							A						(    snake_case				:list[int]    , snake_case				:list[int]    , snake_case				:int		)				->     tuple[float, list[float]]:
	__UpperCamelCase      =	list(range(len(snake_case		)		)		)
	__UpperCamelCase      =	[v / w for v, w in zip(snake_case    , snake_case		)]
	index.sort(key=lambda snake_case		: ratio[i]    , reverse=snake_case		)

	__UpperCamelCase      =	0
	__UpperCamelCase      =	[0] * len(snake_case		)
	for i in index:
		if weight[i] <= capacity:
			__UpperCamelCase      =	1
			max_value += value[i]
			capacity -= weight[i]
		else:
			__UpperCamelCase      =	capacity / weight[i]
			max_value += value[i] * capacity / weight[i]
			break

	return max_value, fractions


if __name__ == "__main__":
						import doctest

						doctest.testmod()





"""simple docstring"""

from math import factorial

UpperCamelCase     :    List[Any]       =			{str(d): factorial(d) for d in range(1_0)}






def 							A						(    snake_case				:int		)				->     int:
 return sum(DIGIT_FACTORIAL[d] for d in str(snake_case		)		)






def 							A						(    )				->     int:
 __UpperCamelCase      =	7 * factorial(9		) + 1
 return sum(i for i in range(3    , snake_case		) if sum_of_digit_factorial(snake_case		) == i		)


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



