#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, unsigned long long);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int t, n, i = 0;
  unsigned long long k;
  scanf("%i", &t);
  while (++i <= t) {
    scanf("%i", &n);
    k = (unsigned long long)n * (n - 1) / 2;
    if (k % 2)
      printf("Case %i: %llu/2\n", i, k);
    else
      printf("Case %i: %llu\n", i, k / 2);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmp    -0x8(%rbp),%eax
jg     11c7 <main+0xa7>
lea    0xea1(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movslq -0xc(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
imul   %rcx,%rax
shr    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     11ab <main+0x8b>
mov    -0x10(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
jmp    11c2 <main+0xa2>
mov    -0x10(%rbp),%esi
mov    -0x18(%rbp),%rdx
shr    $0x1,%rdx
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
jmp    1146 <main+0x26>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecc(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    11ad <main+0x8d>
mov    $0x1,%ebx
lea    0xeaf(%rip),%r14
lea    0xc(%rsp),%r15
lea    0xeb7(%rip),%r12
lea    0xe9f(%rip),%r13
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
lea    -0x1(%rax),%rdx
imul   %rax,%rdx
test   $0x2,%dl
sete   %cl
mov    %r13,%rdi
cmove  %r12,%rdi
add    $0x1,%cl
shr    %cl,%rdx
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0x1(%rbx),%eax
cmp    0x8(%rsp),%ebx
mov    %eax,%ebx
jl     1170 <main+0x50>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [17 x i8] c"Case %i: %llu/2\0A\00"
@.str.2 = [15 x i8] c"Case %i: %llu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %25
8: ; preds = %0, %8
%9 = phi i32 [ %22, %8 ], [ 1, %0 ]
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%11 = load i32, i32* %2
%12 = sext i32 %11 to i64
%13 = add nsw i32 %11, -1
%14 = sext i32 %13 to i64
%15 = mul nsw i64 %14, %12
%16 = and i64 %15, 2
%17 = icmp eq i64 %16, 0
%18 = select i1 %17, i64 2, i64 1
%19 = select i1 %17, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0)
%20 = lshr i64 %15, %18
%21 = call i32 @printf(i8* %19, i32 %9, i64 %20)
%22 = add nuw nsw i32 %9, 1
%23 = load i32, i32* %1
%24 = icmp slt i32 %9, %23
br i1 %24, label %8, label %25
25: ; preds = %8, %0
ret i32 0
}