#include <iostream>
using namespace std;
int main() {
int T,a,b,c,Case=1;
cin >> T;
while(T--){
int ans=0;
cin >> a >> b;
if(a>b){
c=b;
b=a;
a=c;
}
if(a%2!=0){
for(int i = a;i<=b;i+=2){
ans+=i;
}
}
else{
for(int i = a+1;i<=b;i+=2){
ans+=i;
}
}
cout << "Case " << Case++ << ": " << ans << '\n';
}
return 0;
}