- Code: Select all
`#include<stdio.h>`

void main()

{

int testCases, i, j, sum;

long long int data[1000][1000];

long long int avg;

scanf("%d",&testCases);

for (i = 0; i<testCases; i++) {

for(j = 0; j<1; j++) {

scanf("\n%lld %lld", &data[i][j], &data[i][j+1]);

}

}

for (i = 0; i<testCases; i++) {

for(j = 0; j<1; j++) {

sum = data[i][j] + data[i][j+1];

avg = sum/2;

printf("%lld\n", avg);

}

}

}