#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 */
scalar_t__ EOF;
double pow(int, int);
int /*<<< orphan*/ printf(char *, double);
scalar_t__ scanf(char *, int *, int *, double *);
int main() {
  int i, j, k, u, n, m, L;
  double x, y, l, sum;
  while (scanf("%d %d %lf", &n, &m, &x) != EOF) {
    sum = 0.0;
    for (i = n; i >= m; i--) {
      sum += pow(x, i) * pow(1 - x, n - i);
    }
    printf("%.3lf\n", sum);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1040 <scanf@plt>
mov    0x2e8a(%rip),%rcx
cmp    (%rcx),%rax
je     11ed <main+0xbd>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jl     11d7 <main+0xa7>
cvttsd2si -0x28(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <pow@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  0xe65(%rip),%xmm0
subsd  -0x28(%rbp),%xmm0
cvttsd2si %xmm0,%edi
mov    -0x18(%rbp),%esi
sub    -0x8(%rbp),%esi
call   1050 <pow@plt>
movaps %xmm0,%xmm2
movsd  -0x48(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1175 <main+0x45>
movsd  -0x40(%rbp),%xmm0
lea    0xe2f(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xec3(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x2e88(%rip),%r14
cmp    (%r14),%rax
jne    1176 <main+0x46>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc(%rsp),%r12
lea    0x8(%rsp),%r13
lea    0x10(%rsp),%rbx
jmp    11ba <main+0x8a>
nopw   0x0(%rax,%rax,1)
lea    0xe7b(%rip),%rdi
movapd %xmm1,%xmm0
call   1030 <printf@plt>
lea    0xe61(%rip),%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
call   1040 <scanf@plt>
cmp    (%r14),%rax
je     1165 <main+0x35>
mov    0xc(%rsp),%ebp
xorpd  %xmm1,%xmm1
cmp    0x8(%rsp),%ebp
jl     1190 <main+0x60>
mov    %ebp,%r15d
neg    %r15d
xorpd  %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  %xmm1,0x20(%rsp)
cvttsd2si 0x10(%rsp),%edi
mov    %ebp,%esi
call   1050 <pow@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0xdff(%rip),%xmm0
subsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%edi
mov    0xc(%rsp),%esi
add    %r15d,%esi
call   1050 <pow@plt>
movsd  0x20(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm0
addsd  %xmm0,%xmm1
lea    -0x1(%rbp),%eax
add    $0x1,%r15d
cmp    0x8(%rsp),%ebp
mov    %eax,%ebp
jg     11e0 <main+0xb0>
jmp    1190 <main+0x60>

LLVM IR (-O0):
@.str = [10 x i8] c"%d %d %lf\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store i32 0, i32* %1
br label %13
13: ; preds = %40, %0
%14 = call i64 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %7, double* %9)
%15 = load i64, i64* @EOF
%16 = icmp ne i64 %14, %15
br i1 %16, label %17, label %43
17: ; preds = %13
store double 0.000000e+00, double* %12
%18 = load i32, i32* %6
store i32 %18, i32* %2
br label %19
19: ; preds = %37, %17
%20 = load i32, i32* %2
%21 = load i32, i32* %7
%22 = icmp sge i32 %20, %21
br i1 %22, label %23, label %40
23: ; preds = %19
%24 = load double, double* %9
%25 = fptosi double %24 to i32
%26 = load i32, i32* %2
%27 = call double @pow(i32 %25, i32 %26)
%28 = load double, double* %9
%29 = fsub double 1.000000e+00, %28
%30 = fptosi double %29 to i32
%31 = load i32, i32* %6
%32 = load i32, i32* %2
%33 = sub nsw i32 %31, %32
%34 = call double @pow(i32 %30, i32 %33)
%35 = load double, double* %12
%36 = call double @llvm.fmuladd.f64(double %27, double %34, double %35)
store double %36, double* %12
br label %37
37: ; preds = %23
%38 = load i32, i32* %2
%39 = add nsw i32 %38, -1
store i32 %39, i32* %2
br label %19
40: ; preds = %19
%41 = load double, double* %12
%42 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %41)
br label %13
43: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %lf\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i64 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, double* %3)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %36, label %10
10: ; preds = %0, %30
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = icmp slt i32 %11, %12
br i1 %13, label %30, label %14
14: ; preds = %10, %14
%15 = phi double [ %26, %14 ], [ 0.000000e+00, %10 ]
%16 = phi i32 [ %27, %14 ], [ %11, %10 ]
%17 = load double, double* %3
%18 = fptosi double %17 to i32
%19 = call double @pow(i32 %18, i32 %16)
%20 = load double, double* %3
%21 = fsub double 1.000000e+00, %20
%22 = fptosi double %21 to i32
%23 = load i32, i32* %1
%24 = sub nsw i32 %23, %16
%25 = call double @pow(i32 %22, i32 %24)
%26 = call double @llvm.fmuladd.f64(double %19, double %25, double %15)
%27 = add nsw i32 %16, -1
%28 = load i32, i32* %2
%29 = icmp sgt i32 %16, %28
br i1 %29, label %14, label %30
30: ; preds = %14, %10
%31 = phi double [ 0.000000e+00, %10 ], [ %26, %14 ]
%32 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %31)
%33 = call i64 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, double* %3)
%34 = load i64, i64* @EOF
%35 = icmp eq i64 %33, %34
br i1 %35, label %36, label %10
36: ; preds = %30, %0
ret i32 0
}