#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, double);
int /*<<< orphan*/ scanf(char *, ...);
int sin(double);
int main() {
  int cases, caseNo;
  scanf("%d", &cases);
  for (caseNo = 0; caseNo < cases; caseNo++) {
    double big_radius, small_radius, sides;
    scanf("%lf", &big_radius);
    scanf("%lf", &sides);
    small_radius =
        (big_radius * sin((180.0 * 3.14159265358979 / 180.0) / sides)) /
        (1 + sin((180.0 * 3.14159265358979 / 180.0) / sides));
    printf("Case %d: %.10lf\n", caseNo + 1, small_radius);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1202 <main+0xd2>
lea    0xea0(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xe8e(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe66(%rip),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1040 <sin@plt>
movsd  -0x38(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe42(%rip),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1040 <sin@plt>
movsd  -0x30(%rbp),%xmm0
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0xc(%rbp),%esi
add    $0x1,%esi
movsd  -0x20(%rbp),%xmm0
lea    0xe20(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1158 <main+0x28>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
lea    0xec5(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    120a <main+0xda>
lea    0xeaa(%rip),%rbx
lea    0x18(%rsp),%r14
lea    0x10(%rsp),%r15
lea    0xe9d(%rip),%r12
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe52(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
call   1040 <sin@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe2c(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
call   1040 <sin@plt>
add    $0x1,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm0
divsd  %xmm1,%xmm0
add    $0x1,%ebp
mov    %r12,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
cmp    0x4(%rsp),%ebp
jl     1180 <main+0x50>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [17 x i8] c"Case %d: %.10lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = bitcast i32* %1 to i8*
%5 = call i32 (i8*, ...) @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 %31
8: ; preds = %0
%9 = bitcast double* %2 to i8*
%10 = bitcast double* %3 to i8*
br label %11
11: ; preds = %8, %11
%12 = phi i32 [ 0, %8 ], [ %27, %11 ]
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%15 = load double, double* %2
%16 = load double, double* %3
%17 = fdiv double 0x400921FB54442D11, %16
%18 = call i32 @sin(double %17)
%19 = sitofp i32 %18 to double
%20 = fmul double %15, %19
%21 = load double, double* %3
%22 = fdiv double 0x400921FB54442D11, %21
%23 = call i32 @sin(double %22)
%24 = add nsw i32 %23, 1
%25 = sitofp i32 %24 to double
%26 = fdiv double %20, %25
%27 = add nuw nsw i32 %12, 1
%28 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %27, double %26)
%29 = load i32, i32* %1
%30 = icmp slt i32 %27, %29
br i1 %30, label %11, label %31
31: ; preds = %11, %0
ret i32 0
}