#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, i;
    scanf("%d", &n);
    double sum = 1;
    for (i = 2; i <= n; i++)
      sum += 1.0 / i;
    sum *= n;
    printf("%.2f\n", sum);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     11d1 <main+0xb1>
lea    0xeae(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xe95(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11ac <main+0x8c>
cvtsi2sdl -0x10(%rbp),%xmm1
movsd  0xe70(%rip),%xmm0
divsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1177 <main+0x57>
cvtsi2sdl -0xc(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0x1f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed8(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
subl   $0x1,0x8(%rsp)
jae    114d <main+0x2d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xeb4(%rip),%r14
lea    0xc(%rsp),%r15
lea    0xeab(%rip),%rbx
jmp    118a <main+0x6a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  %xmm1,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
subl   $0x1,0x8(%rsp)
jb     1141 <main+0x21>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
movsd  0xe5f(%rip),%xmm3
movapd %xmm3,%xmm1
cmp    $0x2,%eax
jl     1170 <main+0x50>
lea    -0x1(%rax),%ecx
mov    $0x2,%edx
movapd %xmm3,%xmm1
cmp    $0x2,%eax
je     1202 <main+0xe2>
mov    %ecx,%esi
and    $0xfffffffe,%esi
mov    $0x2,%edx
movapd %xmm3,%xmm1
nopl   0x0(%rax)
mov    %edx,%edi
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movapd %xmm3,%xmm2
divsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
lea    0x1(%rdi),%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movapd %xmm3,%xmm1
divsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
lea    0x2(%rdi),%edx
cmp    %esi,%edi
jne    11d0 <main+0xb0>
test   $0x1,%cl
je     1170 <main+0x50>
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movapd %xmm3,%xmm2
divsd  %xmm0,%xmm2
addsd  %xmm2,%xmm1
jmp    1170 <main+0x50>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = add nsw i32 %5, -1
store i32 %6, i32* %1
%7 = icmp eq i32 %5, 0
br i1 %7, label %51, label %8
8: ; preds = %0
%9 = bitcast i32* %2 to i8*
br label %10
10: ; preds = %8, %43
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%12 = load i32, i32* %2
%13 = icmp slt i32 %12, 2
br i1 %13, label %43, label %14
14: ; preds = %10
%15 = add i32 %12, -1
%16 = and i32 %15, 1
%17 = icmp eq i32 %12, 2
br i1 %17, label %34, label %18
18: ; preds = %14
%19 = and i32 %15, -2
br label %20
20: ; preds = %20, %18
%21 = phi double [ 1.000000e+00, %18 ], [ %30, %20 ]
%22 = phi i32 [ 2, %18 ], [ %31, %20 ]
%23 = phi i32 [ 0, %18 ], [ %32, %20 ]
%24 = sitofp i32 %22 to double
%25 = fdiv double 1.000000e+00, %24
%26 = fadd double %21, %25
%27 = or i32 %22, 1
%28 = sitofp i32 %27 to double
%29 = fdiv double 1.000000e+00, %28
%30 = fadd double %26, %29
%31 = add nuw i32 %22, 2
%32 = add i32 %23, 2
%33 = icmp eq i32 %32, %19
br i1 %33, label %34, label %20
34: ; preds = %20, %14
%35 = phi double [ undef, %14 ], [ %30, %20 ]
%36 = phi double [ 1.000000e+00, %14 ], [ %30, %20 ]
%37 = phi i32 [ 2, %14 ], [ %31, %20 ]
%38 = icmp eq i32 %16, 0
br i1 %38, label %43, label %39
39: ; preds = %34
%40 = sitofp i32 %37 to double
%41 = fdiv double 1.000000e+00, %40
%42 = fadd double %36, %41
br label %43
43: ; preds = %39, %34, %10
%44 = phi double [ 1.000000e+00, %10 ], [ %35, %34 ], [ %42, %39 ]
%45 = sitofp i32 %12 to double
%46 = fmul double %44, %45
%47 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %46)
%48 = load i32, i32* %1
%49 = add nsw i32 %48, -1
store i32 %49, i32* %1
%50 = icmp eq i32 %48, 0
br i1 %50, label %51, label %10
51: ; preds = %43, %0
ret i32 0
}