


from bisect import bisect
from itertools import accumulate
def 				UpperCAmelCase_					(							__snake_case     ,						__snake_case     ,						__snake_case     ,						__snake_case						)     ->			Optional[int]:







 """simple docstring"""


 _lowercase							      =sorted(zip(__snake_case     ,						__snake_case						)     ,						key=lambda __snake_case						: x[0] / x[1]     ,						reverse=__snake_case						)
 _lowercase      ,    _lowercase							      =[i[0] for i in r], [i[1] for i in r]
 _lowercase							      =list(accumulate(__snake_case						)						)
 _lowercase							      =bisect(__snake_case     ,						__snake_case						)
 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'''


def 							UpperCAmelCase_  (						__lowerCamelCase					:					int = 1_00 ):
   lowercase_			:Tuple    			= n * (n + 1) * (2 * n + 1) / 6
   lowercase_			:List[str]    			= (n * (n + 1) / 2) ** 2
   return int(square_of_sum - sum_of_squares )


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


