>>> lst = [0, 1, 2, 3, 4, 5]>>> sum(n for n in lst if n % 2 != 0)9
for tc in range(int(input())):
a,b = map(int,input().split())
x = b//2 + (b%2)
y = a//2
print("Case %d: %d"%(tc+1,x*x-y*y))
"""
Input:
2
1 10
2 10
Output:
Case 1: 25
Case 2: 24
"""