#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 *, float);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int t, i;
  scanf("%d", &t);
  for (i = 0; i < t; i++) {
    float n, k, e = 0;
    scanf("%f", &n);
    k = n;
    while (k >= 1) {
      e += (n / k);
      k--;
    }
    printf("%.2f\n", e);
  }
  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
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11d8 <main+0xb8>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xea8(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  0xe7b(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     11b9 <main+0x99>
movss  -0x10(%rbp),%xmm0
divss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe5a(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1178 <main+0x58>
movss  -0x18(%rbp),%xmm0
lea    0xe49(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <main+0x28>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xeda(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,(%rsp)
jle    11c6 <main+0xa6>
lea    0xec2(%rip),%r14
lea    0x4(%rsp),%r15
lea    0xeb9(%rip),%rbx
xor    %ebp,%ebp
jmp    1170 <main+0x50>
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    (%rsp),%ebp
jge    11c6 <main+0xa6>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm1
xorps  %xmm0,%xmm0
movss  0xe72(%rip),%xmm4
ucomiss %xmm4,%xmm1
movss  0xe6b(%rip),%xmm5
jb     1160 <main+0x40>
xorps  %xmm0,%xmm0
movaps %xmm1,%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movaps %xmm1,%xmm3
divss  %xmm2,%xmm3
addss  %xmm3,%xmm0
addss  %xmm5,%xmm2
ucomiss %xmm4,%xmm2
jae    11b0 <main+0x90>
jmp    1160 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = bitcast i32* %1 to i8*
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %27
7: ; preds = %0
%8 = bitcast float* %2 to i8*
br label %9
9: ; preds = %7, %21
%10 = phi i32 [ 0, %7 ], [ %24, %21 ]
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%12 = load float, float* %2
%13 = fcmp ult float %12, 1.000000e+00
br i1 %13, label %21, label %14
14: ; preds = %9, %14
%15 = phi float [ %18, %14 ], [ 0.000000e+00, %9 ]
%16 = phi float [ %19, %14 ], [ %12, %9 ]
%17 = fdiv float %12, %16
%18 = fadd float %15, %17
%19 = fadd float %16, -1.000000e+00
%20 = fcmp ult float %19, 1.000000e+00
br i1 %20, label %21, label %14
21: ; preds = %14, %9
%22 = phi float [ 0.000000e+00, %9 ], [ %18, %14 ]
%23 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), float %22)
%24 = add nuw nsw i32 %10, 1
%25 = load i32, i32* %1
%26 = icmp slt i32 %24, %25
br i1 %26, label %9, label %27
27: ; preds = %21, %0
ret i32 0
}