Help me in solving LB01 problem

My issue

can you debugg my code please where the problem is my code i don’t understand

My code

# Update the program below to solve the problem

t = int(input())            
for i in range(t):          
    A, C = map(int, input().split())
if(A%2 == 0 and C%2 == 0):
    B = (A+C)//2
    print(B)
elif(A%2!=0 and C%2!=0):
    B = (A+C)//2
    print(B)
else:
    print(-1)

Learning course: Logic Building in Python
Problem Link: CodeChef: Practical coding for everyone

@sofiya_2404
Your if elif and else and not inside t for loop;
U have to take care of the indentation .
Like this

t = int(input())            
for i in range(t):          
    A, C = map(int, input().split())
    if(A%2 == 0 and C%2 == 0):
        B = (A+C)//2
        print(B)
    elif(A%2!=0 and C%2!=0):
        B = (A+C)//2
        print(B)
    else:
        print(-1)