a = int(input())
arr = list(map(int, input().split()))
data = list(map(int, input().split()))
arr.sort()
test = sorted(data, reverse=True)
result = 0
for i in range(a):
result += arr[i] * test[i]
print(result)
'프로그래밍 언어 > 파이썬' 카테고리의 다른 글
백준 > 11656 접미사 배열 (0) | 2024.02.24 |
---|---|
백준 > 1764 듣보잡 (0) | 2024.02.23 |
백준 > 2750 수 정렬하기 (0) | 2024.02.23 |
백준 > 11720 숫자의 합 (0) | 2024.02.19 |
백준 > 1546 평균 (0) | 2024.02.14 |