Skip to content

Commit 5971ffe

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 9a7a1e2 commit 5971ffe

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
def maxSubarraySum(arr):
22
ans = arr[0]
3-
3+
44
for i in range(len(arr)):
55
currentSum = 0
6-
6+
77
for j in range(i, len(arr)):
88
currentSum = currentSum + arr[j]
99
ans = max(ans, currentSum)
10-
10+
1111
return ans
1212

13+
1314
if __name__ == "__main__":
14-
arr = list(map(int, input().split(' ')))
15+
arr = list(map(int, input().split(" ")))
1516
print(maxSubarraySum(arr))

0 commit comments

Comments
 (0)