Under construction

Still being built. Things may change

Bombs In My Deck

Interview

Time limit1sMemory limit1024 MB

Summary
Given a deck of A cards with B bombs, find the probability that drawing cards until a non-bomb appears never drops HP (C, 5 per bomb) to 0 or below.
Level

Easy3 of 10

Topics
Probability, Combinatorics, Math, Implementation
Solved
No attempts yet

Problem

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

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

Donghyun starts his next turn with CC HP. On his next turn, he removes 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 00. 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 loses the game if and only if his HP becomes less than or equal to 00. Donghyun asks you to calculate the probability that he does not lose the game on his next turn.

Input

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

Donghyun has AA cards in his deck, BB of them are bombs, and his current HP is CC.

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−610^{-6}.

Examples3

  1. Example 1

    Input
    4 2 5
    
    Expected output
    0.5
    
  2. Example 2

    Input
    4 2 6
    
    Expected output
    0.833333333
    
  3. Example 3

    Input
    4 2 20
    
    Expected output
    1