10261 [백준] 보물 / 1026번 / 파이썬 / Python 🎫code ) import sys input = sys.stdin.readline n = int(input()) a = list(map(int, input().rstrip().split(' '))) t_b = list(map(int, input().rstrip().split(' '))) b = [] for idx, val in enumerate(t_b): b.append((val, idx)) a.sort() b.sort(key=lambda x: -x[0]) res = 0 for i in range(n): tmp = a[i] * b[i][0] res += tmp print(res) 📌 description ) 문제출처 : www.acmicpc.net/problem/1026 1026번: 보물 첫째 줄에 N이.. 2020. 10. 27. 이전 1 다음