본문 바로가기
> 알고리즘 문제 풀이/BOJ

[Python] 1026-보물

by bky373 2020. 10. 27.

> 출처 : 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)

'> 알고리즘 문제 풀이 > BOJ' 카테고리의 다른 글

[Python] 1120-문자열  (0) 2020.11.04
*[Python] 12865-평범한 배낭  (0) 2020.10.27
*[Python] 1904-01타일  (0) 2020.10.26
[Python] 13300-방 배정  (0) 2020.10.26
[Python] 2609-최대공약수와 최소공배수  (0) 2020.10.25

댓글