-
[백준 문제풀이] 얼렁뚱땅 1026번 보물 문제 풀이얼렁뚱땅 백준 문제풀이 2022. 2. 18. 16:59
https://www.acmicpc.net/problem/1026 풀이
n = int(input()) all_thing = [] for i in range(2) : temp = list(map(int, input().split())) all_thing.append(temp) mul = 0 all_thing[0].sort() for i in range(n) : max_num=max(all_thing[1]) max_num_index = all_thing[1].index(max_num) mul = mul+ all_thing[0][i]*max(all_thing[1]) all_thing[1][max_num_index] = -1 print(mul)
'얼렁뚱땅 백준 문제풀이' 카테고리의 다른 글
[백준 문제풀이] 얼렁뚱땅 5585번 거스름돈 문제 풀이 (0) 2022.02.18 [백준 문제풀이] 얼렁뚱땅 1541번 잃어버린 괄호 문제 풀이 (0) 2022.02.18 [백준 문제풀이] 얼렁뚱땅 2667번 단지번호붙이기 풀이 (0) 2022.02.18 [백준 문제풀이] 얼렁뚱땅 1260번 DFS와 BFS 풀이 (0) 2022.02.18 [백준 문제풀이] 얼렁뚱땅 1931번 회의실 배정 문제 풀... (2) 2022.02.17