CF BUDDY
← Problems·

441E · Valera and Number

2400 · bitmasks, dp, math

Problem: Valera is a coder. Recently he wrote a funny program. The pseudo code for this program is given below:

Now Valera wonders: given the values x, k and p, what is the expected value of the resulting number s?

Input Format: The first line of the input contains three integers x, k, p (1 ≤ x ≤ 109; 1 ≤ k ≤ 200; 0 ≤ p ≤ 100).

Output Format: Print the required expected value. Your answer will be considered correct if the absolute or relative error doesn't exceed 10 - 6.

Note: If the concept of expected value is new to you, you can read about it by the link:

http://en.wikipedia.org/wiki/Expected_value

Sample Cases

Case 1

Input

1 1 50

Output

1.0000000000000

Case 2

Input

5 3 0

Output

3.0000000000000

Case 3

Input

5 3 25

Output

1.9218750000000

Similar problems

00:00:00
Loading editor…
Welcome! I'm your coding tutor for this problem. Use the chips below to reveal stored hints or get AI feedback on your code. I'll guide you step by step — never giving away the solution.

Sign in to unlock AI tutor feedback