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

建议使用的浏览器:

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

6558:The Moon

Special Judge 特殊评判
题目描述
The Moon card shows a large, full moon in the night’s sky, positioned between two large towers. The Moon is a symbol of intuition, dreams, and the unconscious. The light of the moon is dim, compared to the sun, and only vaguely illuminates the path to higher consciousness which winds between the two towers.

Random Six is a FPS game made by VBI(Various Bug Institution). There is a gift named "Beta Pack". Mr. K wants to get a beta pack. Here is the rule.
Step 0. Let initial chance rate $q$ = 2%.
Step 1. Player plays a round of the game with winning rate $p%$.
Step 2. If the player wins, then will go to Step 3 else go to Step 4.
Step 3. Player gets a beta pack with probability $q$. If he doesn’t get it, let $q$ = min(100%, $q$ + 2%) and he will go to Step 1.
Step 4. Let $q$ = min(100%, $q$ + 1.5%) and goto Step 1.
Mr. K has winning rate $p$% , he wants to know what’s the expected number of rounds before he needs to play.
输入解释
The first line contains testcase number $T$ ($T$ ≤ 100). For each testcase the first line contains an integer $p$ (1 ≤ $p$ ≤ 100).
输出解释
For each testcase print Case $i$ : and then print the answer in one line, with absolute or relative error not exceeding $10^6$.
输入样例
2
50
100
输出样例
Case 1: 12.9933758002
Case 2: 8.5431270393
来自杭电HDUOJ的附加信息
Recommend chendu

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

源链接: HDU-6558

最后修改于 2020-10-25T23:32:18+00:00 由爬虫自动更新

共提交 0

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