


'''simple docstring'''




from bisect import bisect
from itertools import accumulate

def 			__UpperCamelCase    (    _A    :				Optional[Any]					,   _A    :				Tuple					,   _A    :				Dict					,   _A    :				List[Any]				)    ->      int:




	"""simple docstring"""





	lowerCAmelCase					:    str      							= sorted(zip(_A					,   _A				)					,   key=lambda _A				: x[0] / x[1]					,   reverse=_A				)
	lowerCAmelCase							,   lowerCAmelCase					:    Tuple      							= [i[0] for i in r], [i[1] for i in r]
	lowerCAmelCase					:    Optional[int]      							= list(accumulate(_A				)				)
	lowerCAmelCase					:    Optional[int]      							= bisect(_A					,   _A				)
	return (
	    0
	    if k == 0
	    else sum(vl[:k]				) + (w - acc[k - 1]) * (vl[k]) / (wt[k])
	    if k != n
	    else sum(vl[:k]				)
	)


if __name__ == "__main__":
				import doctest

				doctest.testmod()




'''simple docstring'''




import math

def 			__UpperCamelCase    (    _A    :				int = 1_00				)    ->      int:




	"""simple docstring"""





	lowerCAmelCase					:    List[Any]      							= sum(i * i for i in range(1					,   n + 1				)				)
	lowerCAmelCase					:    Optional[Any]      							= int(math.pow(sum(range(1					,   n + 1				)				)					,   2				)				)
	return square_of_sum - sum_of_squares


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