Leetcode 908. Smallest Range I

class Solution:
    def smallestRangeI(self, A: List[int], K: int) -> int:
        return max(max(max(A)-K,0)-(min(A)+K),0)

 

posted @ 2019-04-13 07:31  周洋  阅读(126)  评论(0)    收藏  举报