#include <iostream>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv)
{
int T,a,b,i,count=1,sum;
scanf("%d",&T);
for(i=0;i<T;i++)
{
scanf("%d",&a);
scanf("%d",&b);
if(a%2==0) a++;
if(b%2==0) b--;
sum=(a+b)*(b-a+2)/4;
printf("Case %d: %d\n",count,sum);
count++;
}
return 0;
}