Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 394 Bytes

1753.md

File metadata and controls

17 lines (15 loc) · 394 Bytes

1753. Maximum Score From Removing Stones

Solution 1 (time O(1), space O(1))

class Solution(object):
    def maximumScore(self, a, b, c):
        """
        :type a: int
        :type b: int
        :type c: int
        :rtype: int
        """
        s = a + b + c
        max_val = max(a, b, c)
        return s - max_val if max_val * 2 >= s else s // 2