Best results

Best results

http://acm.fzu.edu.cn/problem.php?pid=1602


Time Limit:1sMemory limit:32M
Accepted 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]分别表示
12….1000位小数。
 
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值