//
// main.c
// practice
//
// Created by Chen on 2018/6/24.
// Copyright © 2018年 Chen. All rights reserved.
//
#include <stdio.h>
#include <math.h>
int main(int argc, const char * argv[]) {
int n;
while (scanf("%d",&n)!=EOF&&n!=0) {
int a,b,i,j;
for(i=1;i<=n;i++){
int sum=0;
scanf("%d%d",&a,&b);
for (j=a; j<=b; j++) {
if(j%2==1) sum+=j;
}
printf("Case %d: %d\n",i,sum);
}
}
return 0;
}