Crazy CasinoProblem code: CIT02 |
In a gambling house, called Crazy Casino, there is a special slot machine before the exit. In this slot machine, there are SLOT many displays, each corresponds to one slot. In each slot, there are few coins with Happy mark and a single coin with Sad mark. On a hit, the machine independently chooses one element from each slot uniformly at random and displays them in the correponding screen. If the screen has all Sad marks, the player looses and he has to give up all his winnings. If all the marks are Happy, his earnings get doubled. Before playing this game the player is given iNEW many coins. Using each of these coins the player can increase the number of Happy marks in the slot of his choice. e.g. If the player puts three coins in slot 2, number of Happy marks in slot 2 gets increased by three. The player has to use all the iNEW coins before starting the game. Write a program to find out the minimum probability that a player looses against this machine. You will be given an int SLOT representing total number of slots, an int[] iList with initial number of coins (INCLUDING the Sad mark) in each slot and an int iNEW, total number of additional coins available. Your program should output p where 1/p is the minimum probability. You can assume SLOT < 100, iNEW< 100, iList[i]<100 for all i.
Input
The first input is the number of test cases (int)
For each of the test cases the input numbers are arranged as follows:
SLOT, iList[], iNEW
Note that there is a comma (,) between SLOT and first element of iList. The elements of iList are separated by whitespace. Finally there is again a comma between the last element of iList and iNEW.
Output
The datatype of output should be double.
Example
Input: A sample input sequence may look like the following 2 3, 5 7 2, 2 4, 3 3 3 3, 1 Output: The corresponding output should be the following 140.00 108.00
| Author: | bst0602 |
| Date Added: | 9-01-2011 |
| Time Limit: | 1 sec |
| Source Limit: | 50000 Bytes |
| Languages: | C, CPP 4.0.0-8, CPP 4.3.2 |
Comments

Fetching successful submissions

The output format required is
The output format required is of datatype double but here it is showing only 2 trailing 0's after 140 and 108. plz clarify.
the output format should be
the output format should be double.
is there a white space after
is there a white space after the comma?
If format of output is double
If format of output is double then it must be 140.000000 and 108.000000 . Why it is 140.00 && 108.00??
output must be an integer. i
output must be an integer. i dont know what the author tries to mean by "The datatype of output should be double"