当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2995:Another Panda's Birthday Present

题目描述
On Panda's Birthday party, he received a strange present from Jason. The present is a black box with 9 dices in it which is used to play a game. The dice in the box is unusual. Instead of the digits, only red or blue is painted on each side of the dice. Before the first round of the game, the box can repaint every side of every dice red or blue with equal probability. Then for each round of the game, the box will roll the 9 dices and tell the player the number of red side facing up, which is the point the player get. Now, Panda has play it for k(0<=k<=3) rounds and he tell you the point he has got for each round. Can you tell him the expected point he can get for next round.
输入解释
The first line of the input is number of test case. Each test case contains k+1 integers, k which is the number of rounds and a1...ak, which are the points Panda has got for the first k rounds.(0≤ai≤9,0<=k<=3)
输出解释
For each test case, output the expected point panda can get for the third round. Round the answer to the third digit after the decimal point.
输入样例
2
2 2 2 
2 4 4
输出样例
2.000
2.571
来自杭电HDUOJ的附加信息
Recommend chenrui

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-2995

最后修改于 2020-10-25T22:59:01+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)