n = int(input())
for i in range (1,n+1):
sum = 0
a = int(input())
b = int(input())
if a%2==1:
for j in range(a,b+1,2):
sum += j
else:
for j in range(a+1,b+1,2):
sum += j
print("Case "+str(i)+": "+str(sum))