1798. Maximum Number of Consecutive Values You Can Make
Содержание
class Solution:
def getMaximumConsecutive(self, coins: List[int]) -> int:
res = 1
for v in sorted(coins):
if v > res:
break
res += v
return res