


'''simple docstring'''
from __future__ import annotations


def       _lowercase							(					UpperCamelCase__							:       list[int],					UpperCamelCase__							:       list[int],					UpperCamelCase__							:       int      ):
 __A	:		int	  =      list(range(len(UpperCamelCase__      )      )      )
 __A	:		Tuple	  =      [v / w for v, w in zip(UpperCamelCase__,					UpperCamelCase__      )]
 index.sort(key=lambda UpperCamelCase__      : ratio[i],					reverse=UpperCamelCase__      )

 __A	:		float	  =      0
 __A	:		list[float]	  =      [0] * len(UpperCamelCase__      )
 for i in index:
  if weight[i] <= capacity:
   __A	:		Union[str, Any]	  =      1
   max_value += value[i]
   capacity -= weight[i]
  else:
   __A	:		List[str]	  =      capacity / weight[i]
   max_value += value[i] * capacity / weight[i]
   break

 return max_value, fractions


if __name__ == "__main__":
 import doctest

 doctest.testmod()










'''simple docstring'''
def       _lowercase							(					UpperCamelCase__							:       int,					UpperCamelCase__							:       int      ):
 return 1 if input_a == input_a else 0


def       _lowercase							(					):
 assert xnor_gate(0,					0      ) == 1
 assert xnor_gate(0,					1      ) == 0
 assert xnor_gate(1,					0      ) == 0
 assert xnor_gate(1,					1      ) == 1


if __name__ == "__main__":
 print(xnor_gate(0, 0))
 print(xnor_gate(0, 1))
 print(xnor_gate(1, 0))
 print(xnor_gate(1, 1))






