hi jaeneee
baekjoon(1026-보물)_ python 본문
1) 문제
2) 예시
3) 제출
import sys
input = sys.stdin.readline
n = int(input())
list_a = list(map(int, input().split()))
list_b = list(map(int, input().split()))
list_a.sort()
s = 0
for g in range(len(list_a)):
s += list_a[g] * max(list_b)
list_b.remove(max(list_b))
print(s)
4) 메모리/시간/코드길이
5) PLUS
a리스트의 최소와 b리스트의 최대를 곱해서 더해야 최소값이 나온다.
'알고리즘 > baekjoon' 카테고리의 다른 글
baekjoon(1010-다리놓기)_ python (0) | 2022.05.16 |
---|---|
baekjoon(1094-막대기)_ python (0) | 2022.05.15 |
baekjoon(11047-동전0)_ python (0) | 2022.05.02 |
baekjoon(13305-주유소)_ python (0) | 2022.05.02 |
baekjoon(1316-그룹 단어 체커)_ python (0) | 2022.04.13 |
Comments