100MB=10^5KB=10^8B

100MB=100*2^10KB=100*2^20B

Sample Input
2
100[MB]
1[B]

Sample Output
Case #1: 4.63%
Case #2: 0.00%

 # include <iostream>
# include <cstdio>
# include <cstring>
# include <algorithm>
# include <string>
# include <cmath>
# include <queue>
# include <list>
# define LL long long
using namespace std ; char s[]; int change(char s[])
{
if(strcmp(s,"B]") == )return ;
if(strcmp(s,"KB]") == )return ;
if(strcmp(s,"MB]") == )return ;
if(strcmp(s,"GB]") == )return ;
if(strcmp(s,"TB]") == )return ;
if(strcmp(s,"PB]") == )return ;
if(strcmp(s,"EB]") == )return ;
if(strcmp(s,"ZB]") == )return ;
if(strcmp(s,"YB]") == )return ;
} int main()
{
//freopen("in.txt","r",stdin) ;
int T ;
scanf("%d" , &T) ;
int Case = ;
while(T--)
{
Case++ ;
int x ;
scanf("%d[%s" , &x , s) ;
int t = change(s) ;
double ans = pow(1000.0,t)/pow(1024.0,t) ;
ans = - ans ;
printf("Case #%d: %.2lf%%\n",Case,ans*); } return ;
}

hdu 4788 (2013成都现场赛 H题)的更多相关文章

  1. 2013年省赛H题

    2013年省赛H题你不能每次都快速幂算A^x,优化就是预处理,把10^9预处理成10^5和10^4.想法真的是非常巧妙啊N=100000构造两个数组,f1[N],间隔为Af2[1e4]间隔为A^N,中 ...

  2. 2013杭州现场赛B题-Rabbit Kingdom

    杭州现场赛的题.BFS+DFS #include <iostream> #include<cstdio> #include<cstring> #define inf ...

  3. HDU 4816 Bathysphere (2013长春现场赛D题)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4816 2013长春区域赛的D题. 很简单的几何题,就是给了一条折线. 然后一个矩形窗去截取一部分,求最 ...

  4. HDU 4800/zoj 3735 Josephina and RPG 2013 长沙现场赛J题

    第一年参加现场赛,比赛的时候就A了这一道,基本全场都A的签到题竟然A不出来,结果题目重现的时候1A,好受打击 ORZ..... 题目链接:http://acm.hdu.edu.cn/showprobl ...

  5. HDU 4821 String(2013长春现场赛I题)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4821 字符串题. 现场使用字符串HASH乱搞的. 枚举开头! #include <stdio.h ...

  6. HDU 4815 Little Tiger vs. Deep Monkey(2013长春现场赛C题)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4815 简单的DP题. #include <stdio.h> #include <st ...

  7. HDU 4818 Golden Radio Base (2013长春现场赛B题)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4814 进制转换. 现场根据题目给的两个公式,不断更新!!! 胡搞就可以了. 现场3A,我艹,一次循环开 ...

  8. HDU 4815 Little Tiger vs. Deep Monkey 2013 长春现场赛C题

    链接:http://acm.hdu.edu.cn/showproblem.php?pid=4815 [题意] n个题目,每题有各自的分数,A有50%的概率答对一道题目得到相应分数,B想要在至少P的概率 ...

  9. HDU 5119 Happy Matt Friends(2014北京区域赛现场赛H题 裸背包DP)

    虽然是一道还是算简单的DP,甚至不用滚动数组也能AC,数据量不算很大. 对于N个数,每个数只存在两个状态,取 和 不取. 容易得出状态转移方程: dp[i][j] = dp[i - 1][j ^ a[ ...

随机推荐

  1. 关于.Net开源并跨平台的思考

    开源的意义: 关于开源,我个人觉得有两个提高(勿喷). 一方面开源提高了生产力,另一方面开源也是信任的一种体现.为什么这么说呢,在当下的互联网时代,开源是一种核心价值观.人与人沟通交流合作之下,降低成 ...

  2. Cloudstack安装(二)

    Cloudstack安装 官方文档参考: http://docs.cloudstack.apache.org/projects/cloudstack-installation/en/4.9/qig.h ...

  3. element ui 上传文件,读取内容乱码解决

    element ui 上传文件,读取内容乱码解决: 加第二个参数 reader.readAsText(file.raw,'gb2312'); <el-upload class="upl ...

  4. windows下静态编译pthread

    1. Building the library as a statically linkable library-------------------------------------------- ...

  5. logstash过滤配置

    input { redis { host => "127.0.0.1" port => 6380 data_type => "list" ke ...

  6. PHP文件引入

    综述和基本语法 有4个文件加载语句:include,require,include_once,require_once. require函数通常放在 PHP 程序的最前面,PHP 程序在执行前,就会先 ...

  7. Java消息队列三道面试题详解!

    面试题 为什么使用消息队列? 消息队列有什么优点和缺点? Kafka.ActiveMQ.RabbitMQ.RocketMQ 都有什么区别,以及适合哪些场景? 面试官心理分析 其实面试官主要是想看看: ...

  8. bzoj千题计划158:bzoj2406: 矩阵(有源汇上下界可行流)

    http://www.lydsy.com/JudgeOnline/problem.php?id=2406 设矩阵C=A-B 最小化 C 一行或一列和的最大值 整体考虑一行或者一列的和 二分最大值 这样 ...

  9. How to Tell Science Stories with Maps

    Reported Features How to Tell Science Stories with Maps August 25, 2015   Greg Miller This map, part ...

  10. UITableView--文档版

    CHENYILONG Blog UITableView Fullscreen   UITableView技术博客http://www.cnblogs.com/ChenYilong/ 新浪微博http: ...