2214. Minimum Health to Beat Game

Updated: 2024-03-12
1 min read
[]

On This Page

LeetCode problem 2214

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