Skip to content

Commit 817305b

Browse files
committed
[백준] 보물 / 실버 4 / 30분
https://www.acmicpc.net/problem/1026
1 parent a30b613 commit 817305b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
n = int(input())
2+
a = list(map(int, input().split()))
3+
b = list(map(int, input().split()))
4+
a.sort()
5+
s = 0
6+
for i in range(n):
7+
b_max = max(b)
8+
s += a[i] * b_max
9+
b.remove(b_max)
10+
11+
print(s)

0 commit comments

Comments
 (0)