PAT 天梯赛 L1-037. A除以B 【水】
题目链接
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 【水】的更多相关文章
- PAT 天梯赛 L1-036. A乘以B 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-036 AC代码 #include <iostream> #include <cstdio&g ...
- PAT 天梯赛 L1-019. 谁先倒 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-019 AC代码 #include <iostream> #include <cstdio&g ...
- PAT 天梯赛 L1-018. 大笨钟 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-018 AC代码 #include <iostream> #include <cstdio&g ...
- PAT 天梯赛 L1-013. 计算阶乘和 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-013 AC代码 #include <iostream> #include <cstdio&g ...
- PAT 天梯赛 L1-026. I Love GPLT 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-026 AC代码 #include <iostream> #include <cstdio&g ...
- PAT天梯赛 L1-049 天梯赛座位分配
题目链接:点击打开链接 天梯赛每年有大量参赛队员,要保证同一所学校的所有队员都不能相邻,分配座位就成为一件比较麻烦的事情.为此我们制定如下策略:假设某赛场有 N 所学校参赛,第 i 所学校有 M[i] ...
- PAT天梯赛L3-007 天梯地图
题目链接:点击打开链接 本题要求你实现一个天梯赛专属在线地图,队员输入自己学校所在地和赛场地点后,该地图应该推荐两条路线:一条是最快到达路线:一条是最短距离的路线.题目保证对任意的查询请求,地图上都至 ...
- PAT天梯赛练习题——L3-007. 天梯地图(多边权SPFA)
L3-007. 天梯地图 时间限制 300 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 本题要求你实现一个天梯赛专属在线地图,队员输入自己学校 ...
- PTA 天梯赛 L1
L1-002 打印沙漏 细节:就是在 (i>j&&i+j<r+1) 这个区间里才有空格,然后就是 for 循环 for(r=1; ;r+=2) 条件不满足之后还会再 ...
随机推荐
- 第八章 springboot + mybatis + 多数据源2(解决循环引用)
解决了循环引用 1.application.properties #the first datasource jdbc.names:1,2 jdbc1.driverClassName = com.my ...
- SharePoint管理中心配置内容数据库
SharePoint管理中心配置内容数据库 在SharePoint2010中,内容数据库是组织数据的核心. 是全部站点内容信息,如文档.列表数据和Web部件属性等存储的地方.默认地,内 ...
- Math函数的"四舍五入",Floor,Ceiling,Round的一些注意事项!
1.Math.Round:四舍六入五取偶 引用内容 Math.Round(0.0) //0Math.Round(0.1) //0Math.Round(0.2) //0Math.Round(0.3) / ...
- gcc使用备忘
本文为原创文章,转载请指明该文链接 Options Controling the kind of Output -x language 明确说明输入文件的编码语言,没有该选项的话, gcc 会根据输入 ...
- AD使用技巧
1. 效果显示 3 显示3D效果,2显示2D效果. 2. 阻焊塞孔 双击过孔显示属性 solder Mask Expansions Force complete tenting on top Fo ...
- 6.5安装nagios
最近因为,科研需要,接触上了Nagios,这里,我将安装笔记做个详解.为自己后续需要和博友们学习! VMware workstation 11 的下载 VMWare Workstation 11的安装 ...
- JavaBean属性
一个JavaBean对象的属性应该是可访问的.这个属性可以是任意合法的Java数据类型,包括自定义Java类. 一个JavaBean对象的属性可以是可读写,或只读,或只写.JavaBean对象的属性通 ...
- dm8148 开发之---互斥量、条件量、枷锁、互斥枷锁
int OSA_semCreate(OSA_SemHndl *hndl, Uint32 maxCount, Uint32 initVal){ pthread_mutexattr_t mutex_att ...
- Cobbler简介
Cobbler is a Linux provisioning server that facilitates and automates the network-based system insta ...
- 从外部访问 Template (模板)的控件、获取它的属性值
DataTemplate 和 ControlTemplate 两个类均派生自 FrameWorkTemplate类.这个类有个 FindName方法 供我们查询内部控件. ControlTempla ...