Run ID:141469

提交时间:2025-12-25 11:40:03

# 输入:红球 黄 绿 棕 蓝 粉 黑 balls = list(map(int, input().split())) red = balls[0] # 红球数量 colors = balls[1:] # 各彩球数量:[黄,绿,棕,蓝,粉,黑] scores = [2, 3, 4, 5, 6, 7] # 各彩球分值 # 阶段1:有红球时,每次选存在的最高分彩球 max_score = 0 for i in range(6): if colors[i] > 0 and scores[i] > max_score: max_score = scores[i] phase1 = red * (1 + max_score) if red > 0 else 0 # 阶段2:按顺序清彩球(黄到黑) phase2 = sum(colors[i] * scores[i] for i in range(6)) # 总分 total = phase1 + phase2 print(total)