from ctypes import Array import sys while True: try: #总价格,商品数量 total, k = list(map(int, input().split())) #主商品 main_key = [] #权重满意度 perPrice = {} #商品价格 perValue = {} #主商品数据 mainPrice = [] mainValue = [] for i in range(1, k + 1): perPrice[i] = [0, 0, 0] perValue[i] = [0, 0, 0] for i in range(1, k + 1...