#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *, ...);
void main() {
  int a, b, i, t;
  scanf("%d", &t);
  for (i = 1; i <= t; i++) {
    scanf("%d %d", &a, &b);
    if (!(a % 2))
      a++;
    if (!(b % 2))
      b--;
    printf("Case %d: %d\n", i, ((b - a) / 2 + 1) * (a + b) / 2);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11de <main+0xbe>
lea    0xeac(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1180 <main+0x60>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    119d <main+0x7d>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
lea    0xe3b(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1141 <main+0x21>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11d2 <main+0xb2>
lea    0xeaf(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%r12
lea    0xea4(%rip),%rbx
xor    %ebp,%ebp
jmp    119e <main+0x7e>
cs nopw 0x0(%rax,%rax,1)
mov    %ecx,%edx
sub    %eax,%edx
mov    %edx,%esi
shr    $0x1f,%esi
add    %edx,%esi
sar    %esi
add    $0x1,%esi
add    %ecx,%eax
imul   %esi,%eax
mov    %eax,%edx
shr    $0x1f,%edx
add    %eax,%edx
sar    %edx
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
cmp    0x4(%rsp),%ebp
jge    11d2 <main+0xb2>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   $0x1,%al
jne    11bd <main+0x9d>
add    $0x1,%eax
mov    %eax,0xc(%rsp)
add    $0x1,%ebp
mov    0x8(%rsp),%ecx
test   $0x1,%cl
jne    1170 <main+0x50>
add    $0xffffffff,%ecx
mov    %ecx,0x8(%rsp)
jmp    1170 <main+0x50>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [13 x i8] c"Case %d: %d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
store i32 1, i32* %3
br label %6
6: ; preds = %38, %0
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %41
10: ; preds = %6
%11 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%12 = load i32, i32* %1
%13 = srem i32 %12, 2
%14 = icmp ne i32 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %10
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
br label %18
18: ; preds = %15, %10
%19 = load i32, i32* %2
%20 = srem i32 %19, 2
%21 = icmp ne i32 %20, 0
br i1 %21, label %25, label %22
22: ; preds = %18
%23 = load i32, i32* %2
%24 = add nsw i32 %23, -1
store i32 %24, i32* %2
br label %25
25: ; preds = %22, %18
%26 = load i32, i32* %3
%27 = load i32, i32* %2
%28 = load i32, i32* %1
%29 = sub nsw i32 %27, %28
%30 = sdiv i32 %29, 2
%31 = add nsw i32 %30, 1
%32 = load i32, i32* %1
%33 = load i32, i32* %2
%34 = add nsw i32 %32, %33
%35 = mul nsw i32 %31, %34
%36 = sdiv i32 %35, 2
%37 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %26, i32 %36)
br label %38
38: ; preds = %25
%39 = load i32, i32* %3
%40 = add nsw i32 %39, 1
store i32 %40, i32* %3
br label %6
41: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [13 x i8] c"Case %d: %d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 1
br i1 %9, label %37, label %10
10: ; preds = %0, %25
%11 = phi i32 [ %34, %25 ], [ 1, %0 ]
%12 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%13 = load i32, i32* %1
%14 = and i32 %13, 1
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %10
%17 = add nuw nsw i32 %13, 1
store i32 %17, i32* %1
br label %18
18: ; preds = %16, %10
%19 = phi i32 [ %17, %16 ], [ %13, %10 ]
%20 = load i32, i32* %2
%21 = and i32 %20, 1
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %18
%24 = add nsw i32 %20, -1
store i32 %24, i32* %2
br label %25
25: ; preds = %23, %18
%26 = phi i32 [ %24, %23 ], [ %20, %18 ]
%27 = sub nsw i32 %26, %19
%28 = sdiv i32 %27, 2
%29 = add nsw i32 %28, 1
%30 = add nsw i32 %19, %26
%31 = mul nsw i32 %29, %30
%32 = sdiv i32 %31, 2
%33 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32 %32)
%34 = add nuw nsw i32 %11, 1
%35 = load i32, i32* %3
%36 = icmp slt i32 %11, %35
br i1 %36, label %10, label %37
37: ; preds = %25, %0
ret void
}