https://www.acmicpc.net/problem/1026
# 1 <= N(자연수) <= 50
N = int(input())
# 0 <= A, B의 원소(정수) <= 100
A = list(map(int, input().split(' ')))
B = list(map(int, input().split(' ')))
A.sort()
B.sort(reverse=True)
answer = 0
for index in range(N):
answer += A[index] * B[index]
print(answer)
'Problem-solving > 백준' 카테고리의 다른 글
백준(15953번) - (카카오 코드 페스티벌 2018 예선) 상금 헌터 (Python3) (0) | 2020.08.29 |
---|---|
백준 - 바이러스(2606번) (Python3) (0) | 2020.05.28 |
백준 - 스티커(9465번) (Python3) (0) | 2020.05.26 |
백준 - 퇴사(14501번) (Python3) (0) | 2020.05.23 |
백준 - 문자열(1120번) (Python3) (0) | 2020.05.23 |
댓글