#include <iostream> using namespace std; int n,x,y,sum; int main() { cin>>n; while(n--){ sum=0; cin>>x>>y; if(x>y) swap(x,y); for(int i=(x%2==0?x+1:x+2);i<y;i+=2) sum+=i; cout<<sum<<endl; } }