Best results
http://acm.fzu.edu.cn/problem.php?pid=1602
Time Limit :1sMemory limit :32MAccepted Submit :174Total Submit :505
CET is short for “College English Test”.
Oaiei is an outstanding student, and he will participate in CET6 to test his English proficiency every year.
This year's examination he wants to have a fun, with his own level to the test each time, he almost gets
the same results. So he wants to guess the answer this time.
The multiple-choice questions of CET have four options, and you should select a correct answer to the
question. For each choice he has a probability to select the correct answer.
Now the question comes, give you the probability that oaiei will select the correct answer and output the
probability that he will get full mark.
Input
There are multiple tests. For each test, the first line is a positive number N (1<=N<=100); N is the number
of multiple-choice questions. The following N lines, each line is a percentage, the percentage is in the form
of m% (m is a positive integer and 1<=m<=100), represents the probability oaiei can select the correct
answer and he can not guess the all questions with the probability of 100%.
Output
Output the exact value of the probability that oaiei can get full mark. The output value should be accuracy
that is to say you should output the probability’s precise decimal and insignificant trailing zeros must not
be printed..
Sample Input
4
7%
30%
40%
14%
Sample output
0.001176
这是一题有关高精度的计算题,小数的位数有可能达到好几百位甚至千位以上, 用常规的 double 型最多也只有十几位。 所以定义一个整型或字符型的数姐 num[1000] ,用这个数姐来存放小数的每一位 , 最多可存 1000 位。为方便输出,这个 数组里的每一元素定义为十进制,即这个数组中的每一个元素的值不超过 10 。 这样 num[999] , num[998]……num[0] 分别表示 第 1 , 2….1000 位小数。