【PAT】1065. A+B and C (64bit)
来源:互联网 发布:北京大兴区行知小学 编辑:程序博客网 时间:2024/06/05 07:58
#include<iostream>#include<cmath>#include <cstdio>#include<algorithm>using namespace std;int a[100001];int main(){ int t; cin>>t; int cnt=1; while(t--){ long long a,b,c; scanf("%lld%lld%lld",&a,&b,&c); long long res=a+b; if(a>0 && b>0 && res<0) printf("Case #%d: true\n",cnt); else if(a<0 && b<0 && res>=0) printf("Case #%d: false\n",cnt); else if(res>c) printf("Case #%d: true\n",cnt); else printf("Case #%d: false\n",cnt); cnt++; } return 0;}注意判断溢出
0 0
- PAT A 1065. A+B and C (64bit) (20)
- PAt-A 1065. A+B and C(64bit)
- PAT-A 1065. A+B and C (64bit) (20)
- PAT-A-1065. A+B and C (64bit) (20)
- PAT A+B and C (64bit)
- 【PAT】1065. A+B and C (64bit) (20)
- 浙大PAT 1065. A+B and C (64bit) (20)
- PAT 1065. A+B and C (64bit) (20)
- PAT 1065. A+B and C (64bit) (20)
- PAT 1065. A+B and C (64bit)
- ZJU-PAT 1065. A+B and C (64bit) (20)
- PAT 1065. A+B and C (64bit) (20)
- PAT 1065. A+B and C (64bit) (20)
- PAT 1065. A+B and C (64bit) (20)
- PAT:1065. A+B and C (64bit) (20)
- PAT甲级.1065. A+B and C (64bit) (20)
- PAT 1065. A+B and C (64bit) (20)
- 1065. A+B and C (64bit) (20) PAT 甲级
- Android studio版本控制之配置忽略文件
- [HDU5306]吉司机线段树
- Unix高级编程:线程的同步之信号量、进程通信之信号量集、system函数、简单web服务器代码
- 判断鼠标进入容器的方向
- 关于多线程引发的问题,利用semaphore解决
- 【PAT】1065. A+B and C (64bit)
- SX1278调试
- 107. Binary Tree Level Order Traversal II
- saas 软件即服务
- 关于fragment间数据传递和相互切换的问题
- div折行 table折行问题
- CCF201512-2 消除类游戏(100分)
- CF-735B
- Linux初识