Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 357 Bytes

1742.md

File metadata and controls

14 lines (12 loc) · 357 Bytes

1742. Maximum Number of Balls in a Box

Solution 1

class Solution(object):
    def countBalls(self, lowLimit, highLimit):
        """
        :type lowLimit: int
        :type highLimit: int
        :rtype: int
        """
        return max(Counter(sum(map(int, str(i))) for i in range(lowLimit, highLimit + 1)).values())