# Help me in solving LB01A problem

### My issue

Runtime error

Traceback (most recent call last):
File “/mnt/sol.py”, line 4, in
t = int(input())
EOFError: EOF when reading a line

### My code

t = int(input())

for i in range(t):

``````A,C =  map(int,input().split())

B =int((A+C)/2)
if (A%2==0 and C%2 ==0):
print(B)
elif(A%2 != 0 and C%2 != 0):
print(B)
else:
print(-1)
``````
``````# Step 1: Read and understand the problem statement and sample test cases

# Click on 'Next' once you are ready to proceed.
t = int(input())

for i in range(t):

A,C =  map(int,input().split())

B =int((A+C)/2)
if (A%2==0 and C%2 ==0):
print(B)
elif(A%2 != 0 and C%2 != 0):
print(B)
else:
print(-1)

``````

Learning course: Python for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone

#include<stdio.h>

int main()

{

int A,B,C;

int t;

B=(A+C)/2;

scanf(“d”, &t);

while(t–){

if(A%2==0 && C%2==0)

{

printf(“%d\n”, B);

}

else if(A%2!=0 && C%2!=0)

{

printf(“%d\n”, B);

}

else

{

printf(“%d\n”, -1);

}

}

return 0;

}
//Convert this code into python if you can you are all set then!