습관을 애정한다

Code Signal: Intro=37/60

by 습관중독
def arrayMaxConsecutiveSum(inputArray, k):
SOR = []
for i in range(len(inputArray)):
total = 0
for j in range(i, i+k):
if (i+k) <= len(inputArray):
total += inputArray[j]
print(total)
if total != 0:
SOR.append(total)
SOR.sort()
return SOR[-1]
블로그의 프로필 사진

블로그의 정보

습관을 애정한다

습관중독

활동하기