## TLE '17 Contest 3 P4 - Meatballs

View as PDF

Points: 12 (partial)
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig
Mama mia! That's a spicy meatball-a!

Fax McClad, Croneria's hungriest bounty hunter, is about to participate in the annual Cronerian Thanksgiving Meatball Contest! There are participants, including Fax, numbered from to .

The contest will consist of elimination rounds. Each round, the remaining participants line up in order of their number. Suppose there are people in the current round. Then, they will be given a total of meatballs on a plate, one of which is very spicy.

The participant at the front of the line eats a single meatball from the plate, without replacement. If they eat the spicy meatball, then they are eliminated, and the next round begins. If they do not eat the spicy meatball, they go to the back of the line, and the next participant at the front of the line goes up to eat. The process continues until the spicy meatball has been eaten. After the last round, there is only one participant remaining. That participant is declared the winner.

Fax wants the grand prize of the contest, one million moneys, so he can do more weapons research. If Fax is participant number , what is the probability that he will win?

1 5
2 15
3 20
4 40
5 20

#### Input Specification

The only line of input will consist of 3 space-separated integers, , , and .

#### Output Specification

On a single line, output a real number, the probability that Fax will win the contest. Your answer will be judged correct if its relative error does not exceed . It is recommended to output in scientific notation (most languages should support this).

#### Sample Input 1

4 0 2

#### Sample Output 1

0.25

#### Sample Input 2

5 1 3

#### Sample Output 2

2.00000000e-01