题目链接

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

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 a, b;
cin >> a >> b;
printf("%d/", a);
if (b < 0)
printf("(%d)=", b);
else
printf("%d=", b);
if (b == 0)
printf("Error\n");
else
printf("%.2lf\n", a * 1.0 / b);
}

PAT 天梯赛 L1-037. A除以B 【水】的更多相关文章

  1. PAT 天梯赛 L1-036. A乘以B 【水】

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

  2. PAT 天梯赛 L1-019. 谁先倒 【水】

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

  3. PAT 天梯赛 L1-018. 大笨钟 【水】

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

  4. PAT 天梯赛 L1-013. 计算阶乘和 【水】

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

  5. PAT 天梯赛 L1-026. I Love GPLT 【水】

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

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

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

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

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

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

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

  9. PTA 天梯赛 L1

    L1-002 打印沙漏 细节:就是在  (i>j&&i+j<r+1) 这个区间里才有空格,然后就是 for 循环   for(r=1; ;r+=2)  条件不满足之后还会再 ...

随机推荐

  1. iOS 学习笔记一【屏幕截图,并显示当前View】

    // 直接上代码: // // ViewController.h // 屏幕截图测试 // // Created by 博爱之家 on 15/11/11. // Copyright © 2015年 博 ...

  2. Android项目使用Dagger2进行依赖注入

    原文链接:http://code.tutsplus.com/tutorials/dependency-injection-with-dagger-2-on-android–cms-23345 依赖注入 ...

  3. request:getParameter和getAttribute区别

    getParameter 是用来接受用post个get方法传递过来的参数的.getAttribute 必须先setAttribute.(1)request.getParameter() 取得是通过容器 ...

  4. 基于springCloud的分布式架构体系

    Spring Cloud作为一套微服务治理的框架,几乎考虑到了微服务治理的方方面面,之前也写过一些关于Spring Cloud文章,主要偏重各组件的使用,本次分享主要解答这两个问题:Spring Cl ...

  5. 解决android studio引用远程仓库下载慢(转)

    解决android studio引用远程仓库下载慢(JCenter下载慢) 第一种方法 使用开源中国的maven库 阿里云的(速度飞快):http://maven.aliyun.com/nexus/c ...

  6. Large repunit factors (Project Euler 132)

    题目大意: 求出 大数111111.....1 (1e9个1)  前40个质因子的和. 思路:可以把原来的数表示成$\frac{10^k - 1}{9}$ 其中$k=10^9$ 如果一个质数$p$ 满 ...

  7. hbuilder mui如何监听搜索框点击清除按钮

    监听代码如下: mui(".mui-icon-clear")[0].addEventListener('tap',function(){    console.log(456)}) ...

  8. hdu 4005(边双连通)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4005 思路:首先考虑边双连通分量,如果我们将双连通分量中的边删除,显然我们无法得到非连通图,因此要缩点 ...

  9. OpenCV学习笔记八:opencv_photo模块

    一,简介: 该库用于数码照片的处理,处于发展中,目前只包含如下算法: //! restores the damaged image areas using one of the available i ...

  10. linux 下 Shell编程(三)

    if语句应用实例 if语句可以在程序中实现各种逻辑判断. 用if语句判断并显示文件的信息 可以用test命令和相关的参数来判断文件的属性,然后根据判断结果输出文件的信息. #!/bin/bash #4 ...