My issue
in my approach i started traversing through the list and find a,b,c by index l[i] and l[i+1]. if 2*b==a+c i increased the count
print count
it is not passing the testcases
My code
# cook your dish here
t=int(input())
for i in range(t):
n=int(input())
d=0
l=[int(i) for i in input().split()]
for i in range(1,len(l)-1):
a=l[i]-l[i+1]
b=l[i]+l[i+1]
c=l[i]*l[i+1]
if 2*b==a+c:
d+=1
print(d)
Problem Link: Freedom Practice Coding Problem - CodeChef