1class Solution:2 def getMaximumConsecutive(self, coins: List[int]) -> int:3 cur_max = 04 coins.sort()56 for coin in coins:7 if coin == 1:8 cur_max += 19 elif coin <= cur_max + 1:10 cur_max += coin11 else: # coin > cur_max + 112 break1314 return cur_max + 1
WPM •0 •0
ACC •0 •0
TIME •0