#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 *, double);
int read_line(char *);
double run(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  char buffer[121];
  int n = 0;
  scanf("%d\n", &n);
  while (n--) {
    int len = read_line(buffer);
    printf("%.8f\n", run(buffer, len) * 6.731984257692413 / 15 + len);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x84(%rbp)
lea    0xead(%rip),%rdi
lea    -0x84(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x84(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x84(%rbp)
cmp    $0x0,%eax
je     11dc <main+0x9c>
lea    -0x80(%rbp),%rdi
call   1060 <read_line@plt>
mov    %eax,-0x88(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x88(%rbp),%esi
call   1030 <run@plt>
movsd  0xe59(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe45(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x88(%rbp),%xmm1
ff
addsd  %xmm1,%xmm0
lea    0xe42(%rip),%rdi
call   1040 <printf@plt>
jmp    116f <main+0x2f>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x90,%rsp
movl   $0x0,0xc(%rsp)
lea    0xeb6(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
subl   $0x1,0xc(%rsp)
jb     11be <main+0x7e>
lea    0x10(%rsp),%rbx
lea    0xe9d(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1060 <read_line@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <run@plt>
mulsd  0xe64(%rip),%xmm0
divsd  0xe64(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
addsd  %xmm1,%xmm0
mov    %r14,%rdi
call   1040 <printf@plt>
subl   $0x1,0xc(%rsp)
jae    1180 <main+0x40>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [6 x i8] c"%.8f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [121 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
br label %6
6: ; preds = %10, %0
%7 = load i32, i32* %3
%8 = add nsw i32 %7, -1
store i32 %8, i32* %3
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %22
10: ; preds = %6
%11 = getelementptr inbounds [121 x i8], [121 x i8]* %2, i64 0, i64 0
%12 = call i32 @read_line(i8* %11)
store i32 %12, i32* %4
%13 = getelementptr inbounds [121 x i8], [121 x i8]* %2, i64 0, i64 0
%14 = load i32, i32* %4
%15 = call double @run(i8* %13, i32 %14)
%16 = fmul double %15, 0x401AED8D47FFE72B
%17 = fdiv double %16, 1.500000e+01
%18 = load i32, i32* %4
%19 = sitofp i32 %18 to double
%20 = fadd double %17, %19
%21 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %20)
br label %6
22: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [6 x i8] c"%.8f\0A\00"
define i32 @main() {
%1 = alloca [121 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [121 x i8], [121 x i8]* %1, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = add nsw i32 %6, -1
store i32 %7, i32* %2
%8 = icmp eq i32 %6, 0
br i1 %8, label %20, label %9
9: ; preds = %0, %9
%10 = call i32 @read_line(i8* %3)
%11 = call double @run(i8* %3, i32 %10)
%12 = fmul double %11, 0x401AED8D47FFE72B
%13 = fdiv double %12, 1.500000e+01
%14 = sitofp i32 %10 to double
%15 = fadd double %13, %14
%16 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %15)
%17 = load i32, i32* %2
%18 = add nsw i32 %17, -1
store i32 %18, i32* %2
%19 = icmp eq i32 %17, 0
br i1 %19, label %20, label %9
20: ; preds = %9, %0
ret i32 0
}