1043:Are you like M&M chocolate?

Time/Memory Limit:1000 MS/32768 K
Submitted: 28 Accepted: 5

 Problem Description

<p> In 2011, M&amp;M chocolate will be one of the favorite foods in the world.</p> <p> &quot;Green, orange, brown, red...&quot;, colorful sugar-coated shell maybe is the most attractive feature of M&amp;M chocolate. How many colors have you ever seen? Nowadays, it&#39;s said that the ACM chooses from a palette of twenty-four colors to paint their delicious candy bits.</p> <p> A big package of M&amp;M chocolates which contains five colors (green, orange, brown, red and yellow). One day Ken took one chocolate from the package and placed it on the table. If there were two chocolates of the same color on the table, he ate both of them. He found a quite interesting thing that in most of the time there were always 2 or 3 chocolates on the table.</p> <p> Now, here comes the problem, if there are C colors of M&amp;M chocolates in the package (colors are distributed evenly), after N chocolates are taken from the package, what&#39;s the probability that there is exactly M chocolates on the table? Would you please write a program to figure it out?</p>

 Input

The input file for this problem contains several test cases, one per line.<br /> For each case, there are three non-negative integers: C (C &lt;= 100), N and M (N, M &lt;= 1000000).<br /> The input is terminated by a line containing -1.

 Output

The output should be one real number per line, shows the probability for each case, round to three decimal places.

 Sample Input

6 100 4
-1

 Sample Output

0.469

 Hints

1

 Author

1

 Source

参考自 Beijing 2002

 Recommend

zh