using System;
public class Program
{
public static void Main()
int N =Convert.ToInt32(Console.ReadLine());
string[] V;
int aux2, X, Y, soma=0;
for (int x =0; x <N; x++){
V = Console.ReadLine().Split(' ');
X = int.Parse(V[0]);
Y = int.Parse(V[1]);
if(X>Y){
aux2= X;
X=Y;
Y=aux2;
}
for (int aux = X+1; aux <Y; aux++){
if (aux%2!=0){
soma += aux;
Console.WriteLine(soma);
soma=0;