6288

· Algorithm
문제 링크 https://softeer.ai/practice/6288 Softeer - 현대자동차그룹 SW인재확보플랫폼 softeer.ai 문제 풀이 import sys input = sys.stdin.readline w, n = map(int, input().split()) sum_weight = 0 price = 0 metals = [] for _ in range(n): m, p = map(int, input().split()) metals.append([m, p]) metals.sort(key=lambda x: -x[1]) idx = -1 while idx w: break sum_weight += metals[idx][0] price += metals[idx][1] * metals[idx][0] p..
YOONJELLY
'6288' 태그의 글 목록