long long t,l,r,n; cin>>t; while(t--){ cin>>l>>r; n=0; for(int i=l;i<=r;i++){ if(i%2!=0){ n++; } } cout<<n<<"\n"; }