405256: GYM101858 H Heaven's Arena

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

H. Heaven's Arenatime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Heaven's Arena is a huge building, said to have infinite floors up and down, that fighters can battle to earn money and have a private bedroom, if they are good enough.

This year, the Heaven's Arena changed it rules. Now you start at floor $$$n$$$ and fight a total of $$$a$$$ battles. Each time you win a battle you go to the next level, and each time you lose you go to the previous level. There's no tie on Heaven's Arena.

You know you have a $$$p$$$ percent chance to win each battle. What is the expected floor you will end up at after all your battles?

Input

The first line of input contains three integers, $$$n$$$, $$$a$$$ and $$$p$$$ ($$$0 \le n, a \le 10^9$$$, $$$0 \le p \le 100$$$) — the floor you start, the number of battles you will fight and the percent chance to win.

Output

Print the expected floor you will end up at after all your battles.

The error between the answer and the printed value must not exceed $$$10^{-6}$$$ in absolute value.

ExamplesInput
5 2 75
Output
6.000000000
Input
100 7 21
Output
95.940000000

Source/Category

加入题单

上一题 下一题 算法标签: