코드
from functools import reduce
def solution(A, B):
A.sort()
B.sort(reverse = True)
return reduce(lambda x, y : x + y[0]*y[1], zip(A, B), 0)
from functools import reduce
def solution(A, B):
A.sort()
B.sort(reverse = True)
return reduce(lambda x, y : x + y[0]*y[1], zip(A, B), 0)