#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 *, double *, int *, double *);
int main() {
  double a, c, x = 0, y = 100;
  int i, b;
  scanf("%lf%d%lf", &a, &b, &c);
  while (y - x > 1e-5) {
    double m = x + (y - x) / 2;
    double f = a;
    for (i = 0; i < b; i++)
      f += f * m / 100.0 - c;
    if (f < 0)
      x = m;
    else
      y = m;
  }
  printf("%.3lf%%\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    0xecd(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <scanf@plt>
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  0xe9a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1218 <main+0xf8>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  0xe81(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    11ec <main+0xcc>
movsd  -0x40(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  0xe35(%rip),%xmm1
divsd  %xmm1,%xmm0
subsd  -0x18(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11ad <main+0x8d>
xorps  %xmm0,%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    1209 <main+0xe9>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1213 <main+0xf3>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    115c <main+0x3c>
movsd  -0x20(%rbp),%xmm0
lea    0xdfd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xeed(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x4(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm1
mov    0x4(%rsp),%eax
movsd  0x8(%rsp),%xmm2
mov    %eax,%ecx
and    $0xfffffffe,%ecx
xorpd  %xmm10,%xmm10
movsd  0xe9f(%rip),%xmm3
movsd  0xe9e(%rip),%xmm8
movsd  0xe9d(%rip),%xmm9
movapd %xmm3,%xmm4
xorpd  %xmm6,%xmm6
movapd %xmm3,%xmm5
jmp    11b9 <main+0x99>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmpltsd %xmm10,%xmm7
andpd  %xmm7,%xmm5
andnpd %xmm4,%xmm7
orpd   %xmm7,%xmm5
movapd %xmm5,%xmm4
subsd  %xmm0,%xmm4
ucomisd %xmm9,%xmm4
movapd %xmm0,%xmm6
jbe    123d <main+0x11d>
mulsd  %xmm8,%xmm4
addsd  %xmm6,%xmm4
movapd %xmm1,%xmm7
test   %eax,%eax
jle    1225 <main+0x105>
movapd %xmm1,%xmm7
cmp    $0x1,%eax
je     120d <main+0xed>
mov    %ecx,%edx
movapd %xmm1,%xmm7
nopl   0x0(%rax)
movapd %xmm4,%xmm0
mulsd  %xmm7,%xmm0
divsd  %xmm3,%xmm0
subsd  %xmm2,%xmm0
addsd  %xmm7,%xmm0
movapd %xmm4,%xmm7
mulsd  %xmm0,%xmm7
divsd  %xmm3,%xmm7
subsd  %xmm2,%xmm7
addsd  %xmm0,%xmm7
add    $0xfffffffe,%edx
jne    11e0 <main+0xc0>
test   $0x1,%al
je     1225 <main+0x105>
movapd %xmm4,%xmm0
mulsd  %xmm7,%xmm0
divsd  %xmm3,%xmm0
subsd  %xmm2,%xmm0
addsd  %xmm0,%xmm7
ucomisd %xmm7,%xmm10
movapd %xmm4,%xmm0
ja     1190 <main+0x70>
movapd %xmm6,%xmm0
jmp    1190 <main+0x70>
lea    0xddd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

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