class Solution: def IncreasingArray(self, array): # write code here res = 0 for i in range(0, len(array)-1): res+=max(0, array[i]+1-array[i+1]) return res nums = list(map(int, input().split())) s = Solution() print(s.IncreasingArray(nums))
请问一下这个代码怎么错了?通过率0%
全部评论
(7) 回帖