2214. Minimum Health to Beat Game

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 2214

class Solution:
    def minimumHealth(self, damage: List[int], armor: int) -> int:
        return sum(damage) - min(max(damage), armor) + 1