Problem Description
Yesterday your dearcousin Coach Pang gave you a new 100MB hard disk drive (HDD) as a gift becauseyou will get married next year.
But you turned on yourcomputer and the operating system (OS) told you the HDD is about 95MB. The 5MBof space is missing. It is known that the HDD manufacturers have a differentcapacity measurement. The manufacturers think 1 “kilo” is 1000 but the OSthinks that is 1024. There are several descriptions of the size of an HDD. Theyare byte, kilobyte, megabyte, gigabyte, terabyte, petabyte, exabyte, zetabyteand yottabyte. Each one equals a “kilo” of the previous one. For example 1gigabyte is 1 “kilo” megabytes.
Now you know the size ofa hard disk represented by manufacturers and you want to calculate thepercentage of the “missing part”.
Input
The first line containsan integer T, which indicates the number of test cases.
For each test case,there is one line contains a string in format “number[unit]” where number is apositive integer within [1, 1000] and unit is the description of size whichcould be “B”, “KB”, “MB”, “GB”, “TB”, “PB”, “EB”, “ZB”, “YB” in shortrespectively.
Output
For each test case,output one line “Case #x: y”, where x is the case number (starting from 1) andy is the percentage of the “missing part”. The answer should be rounded to twodigits after the decimal point.
Sample Input
2
100[MB]
1[B]
Sample Output
Case #1: 4.63%
Case #2: 0.00%
HardDisk Drive
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
悬赏问题
- ¥15 做个有关计算的小程序
- ¥15 MPI读取tif文件无法正常给各进程分配路径
- ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
- ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
- ¥15 setInterval 页面闪烁,怎么解决
- ¥15 如何让企业微信机器人实现消息汇总整合
- ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
- ¥15 如何用Python爬取各高校教师公开的教育和工作经历
- ¥15 TLE9879QXA40 电机驱动
- ¥20 对于工程问题的非线性数学模型进行线性化