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  周洋  阅读(118)  评论(0编辑  收藏  举报