Chocolate Box
Input: standard input
Output: standard output
Time Limit: 1 second
Recently one of my friend Tarik became a member of the food committee
of an ACM regional competition. He has been given m distinguishable
boxes, he has to put n types of chocolates in the boxes. The
probability that one chocolate is placed in a certain box is 1 / m.
What is the probability that one or more boxes are empty?
Input
Each line of the input contains
two integers n indicating total number of distinguishable types
of chocolate and m indicating total number of distinguishable
boxes ( m <= n < 100 ). A single line containing
-1 denotes the end.
For each of the cases you should calculate the probability corrected to seven decimal places. The output format is shown below.
Sample Input
50 12
50 12
-1
Sample
Output
Case 1: 0.1476651
Case 2: 0.1476651
Problem Setter: A. K. M. Saifun Nabi (Shabuj) ( BUET PESSIMISTIC )
Thanks to Anupam Bhattacharjee for his alternate solution and data.