题目链接

https://www.patest.cn/contests/gplt/L1-040

AC代码

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <map>
#include <stack>
#include <set>
#include <cstdlib>
#include <ctype.h>
#include <numeric>
#include <sstream>
using namespace std; typedef long long LL;
const double PI = 3.14159265358979323846264338327;
const double E = 2.718281828459;
const double eps = 1e-6;
const int MAXN = 0x3f3f3f3f;
const int MINN = 0xc0c0c0c0;
const int maxn = 1e5 + 5;
const int MOD = 1e9 + 7; int main()
{
int n;
cin >> n;
while (n--)
{
char c;
double num;
scanf(" %c %lf", &c, &num);
if (c == 'M')
printf("%.2lf\n", (num * 1.0 / 1.09));
else
printf("%.2lf\n", num * 1.09);
}
}

PAT 天梯赛 L1-040. 最佳情侣身高差 【水】的更多相关文章

  1. 团体程序设计天梯赛-练习集-L1-040. 最佳情侣身高差

    L1-040. 最佳情侣身高差 专家通过多组情侣研究数据发现,最佳的情侣身高差遵循着一个公式:(女方的身高)×1.09=(男方的身高).如果符合,你俩的身高差不管是牵手.拥抱.接吻,都是最和谐的差度. ...

  2. L1-040 最佳情侣身高差

    专家通过多组情侣研究数据发现,最佳的情侣身高差遵循着一个公式:(女方的身高)×1.09 =(男方的身高).如果符合,你俩的身高差不管是牵手.拥抱.接吻,都是最和谐的差度. 下面就请你写个程序,为任意一 ...

  3. PAT 天梯赛 L1-045. 宇宙无敌大招呼 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-045 AC代码 #include <iostream> #include <cstdio&g ...

  4. PAT 天梯赛 L1-017. 到底有多二 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-017 AC代码 #include <iostream> #include <cstdio&g ...

  5. PAT 天梯赛 L1-008. 求整数段和 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-008 AC代码 #include <iostream> #include <cstdio&g ...

  6. PAT 天梯赛 L1-029. 是不是太胖了 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-029 AC代码 #include <iostream> #include <cstdio&g ...

  7. PAT天梯赛 L1-049 天梯赛座位分配

    题目链接:点击打开链接 天梯赛每年有大量参赛队员,要保证同一所学校的所有队员都不能相邻,分配座位就成为一件比较麻烦的事情.为此我们制定如下策略:假设某赛场有 N 所学校参赛,第 i 所学校有 M[i] ...

  8. PAT天梯赛L3-007 天梯地图

    题目链接:点击打开链接 本题要求你实现一个天梯赛专属在线地图,队员输入自己学校所在地和赛场地点后,该地图应该推荐两条路线:一条是最快到达路线:一条是最短距离的路线.题目保证对任意的查询请求,地图上都至 ...

  9. PAT天梯赛练习题——L3-007. 天梯地图(多边权SPFA)

    L3-007. 天梯地图 时间限制 300 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 本题要求你实现一个天梯赛专属在线地图,队员输入自己学校 ...

随机推荐

  1. c++ why doesn't c++ allow rebinding a reference ?

    http://stackoverflow.com/questions/27037744/why-doesnt-c-allow-rebinding-a-reference# 1. The primary ...

  2. codeforces 651a oysticks

      Time Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status De ...

  3. LeetCode300. Longest Increasing Subsequence

    Description Given an unsorted array of integers, find the length of longest increasing subsequence. ...

  4. 服务器操作系统应该选择Debian/Ubuntu还是CentOS?

    任何 Linux 发行版本,在理论上都是一样的.只不过操作有的方便,有的麻烦!yum 是比 apt 弱(这就是企业维护和社区维护的区别,企业自己维护不需要这么多功能)但是任何能在 A 发行版本上实现的 ...

  5. 夏日炎炎 python写个天气预报

    东南地区连续突破历史,江浙沪除了包邮之外的另一福利-桑拿也已到手.这样的日子里是应该每日关注天气主义降暑避免出现热疾病,python包含比 较多的网络应用类这样就方便了一些网络应用的操作,之外还有些可 ...

  6. JNI动态库生成、编译、查看相关简易资料

    有一篇好博文,大家可以看下http://www.cnblogs.com/zhangweia/archive/2010/09/16/1828176.html,我这里是参考其做的另外一个javah -cl ...

  7. 使用jQuery lazyload 实现图片延迟加载

    下载地址 使用说明 0. 准备工作 下载jQuery和lazyload 插件(地址如上) 1. HTML 引入jQuery库和lazyload插件 <div id="imagesCon ...

  8. JavaScript中的对象类型详解

    To be finished 摘要 1.什么是对象? 2.引用类型和原始类型 3.对象数据属性拥有的特性(Attributes) 4.如何创建对象 a.直接定义 var mango={color:&q ...

  9. B - Catch That Cow (抓牛)

    B - Catch That Cow Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u ...

  10. javascript中字符串截取的两种方法

    var testStr = "hello kay!"; 1.substr testStr.substr(1)   ->ello kay! testStr.substr(1,4 ...