407316: GYM102760 B Bombs In My Deck

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

Description

B. Bombs In My Decktime limit per test1 secondmemory limit per test1024 megabytesinputstandard inputoutputstandard output

Donghyun is playing a digital card game. In this game, two players start with a deck (stack of cards) of $$$30$$$ cards and $$$30$$$ HP (health points). They alternate turns drawing and playing their cards. The winner is the first person who makes their opponent's HP less than or equal to $$$0$$$.

This time, Donghyun met a tough opponent; the opponent mixed some bombs into Donghyun's deck! Now, there are $$$A$$$ cards in Donghyun's deck, and $$$B$$$ of them are bombs. Each card in the deck is equally likely to be a bomb.

Donghyun starts his next turn with $$$C$$$ HP. On his next turn, he will remove cards from the top of his deck one at a time until he removes a card that is not a bomb or until his HP becomes less than or equal to 0. For each bomb that he removes, he loses 5 HP. Donghyun's deck is guaranteed to contain at least one card which is not a bomb, so this process is guaranteed to terminate.

Donghyun is worried he may lose the game because of the bombs. Specifically, he will lose the game if and only if his HP becomes less than or equal to $$$0$$$. Donghyun asks you to calculate the probability that he does not lose the game in his next turn.

Input

On the first and only line, three space-separated integers $$$A$$$, $$$B$$$, and $$$C$$$ are given. ($$$1 \le B < A \le 30$$$, $$$1 \le C \le 30$$$)

Donghyun has $$$A$$$ cards in his deck, $$$B$$$ of them are bombs, and his current HP is $$$C$$$.

Output

Output the probability that Donghyun survives after his next turn.

Your output will be considered correct if the absolute error between your answer and the jury's answer does not exceed $$$10^{-6}$$$.

ExamplesInput
4 2 5
Output
0.500000000
Input
4 2 6
Output
0.833333333
Input
4 2 20
Output
1

加入题单

算法标签: