include[HTML_REMOVED]
using namespace std;
int main()
{
int t,a,b,ans;
cin>>t;
while(t–)
{
cin>>a>>b;
if(a>b)swap(a,b);
ans=0;
for(int i=a+1;i<b;i++)
{
if(i%2!=0)ans+=i;
}
cout<<ans<<”\n”;
}
}