Skip to content

Commit 81bb8f1

Browse files
committed
1 parent 0d95e78 commit 81bb8f1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Hongjoo/lv2/최소값만들기.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
def solution(A,B):
2+
# 누적 최소값 방법 : 최소 * 최대
3+
'''
4+
5+ 8+16 = 29
5+
4+ 6 = 10
6+
'''
7+
a= sorted(A)
8+
b = sorted(B)
9+
print(b)
10+
answer = 0
11+
for i in range(len(a)):
12+
answer += a[i] * b[-1+ -1*i]
13+
14+
15+
return answer

0 commit comments

Comments
 (0)