> 알고리즘 문제 풀이/BOJ
[Python] 1026-보물
bky373
2020. 10. 27. 00:58
> 출처 : www.acmicpc.net/problem/1026
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A.sort()
B.sort(reverse=True)
S = sum(map(lambda x: x[0]*x[1], zip(A,B)))
print(S)