My issue
.
My code
t = int(input())
for _ in range(t):
n = int(input())
arr = list(map(int, input().split()))
final = 0
i = 0
while i < (n - 1):
temp = arr[i] + arr[i + 1]
if temp > final:
final = temp
i = i + 1 # Change here, increment i by 1 to consider all pairs
print(final)
Learning course: Python with Data structures
Problem Link: Practice Problem in - CodeChef