到底是不是太胖了(卡精度)
2017-03-24 17:16
190 查看
这个题用double 的话,会卡点精度。。最后一组总是错
然后。。。以后转化为int 来比较好了
然后。。。以后转化为int 来比较好了
#include <iostream> #include <cstdio> #include <cstring> using namespace std; int main() { int n; scanf("%d",&n); while(n--) { int h,w; cin>>h>>w; int ans=(h-100)*2*1000*9/10; int l=ans*9/10; int r=ans*11/10; w=w*1000; if(w>l&&w<r) printf("You are wan mei!\n"); else if(w<=l) printf("You are tai shou le!\n"); else if(w>=r) printf("You are tai pang le!\n"); } return 0; }
相关文章推荐
- L1-7 到底是不是太胖了(10 分)(坑爹的精度控制)
- 到底是不是太胖了(卡精度)
- 到底是不是太胖了(卡精度)
- 到底是不是太胖了(卡精度)
- 到底是不是太胖了(卡精度)
- 到底是不是太胖了(卡精度)
- 到底是不是太胖了(卡精度)
- 到底是不是太胖了(卡精度)
- L1-031. 到底是不是太胖了 C++
- Java到底是不是一种纯面向对象语言?
- 普通高中生水平就能干好的编程到底是不是高科技?
- 普通高中生水平就能干好的编程到底是不是高科技?(zt)
- 2016华为机试题(不知到底是不是)
- 计时精度到底毫秒级别或者更高 如何使用C#制作一个精确计时器
- 智能算法推荐到底是不是原罪
- 云计算、Web2.0、SOA、SaaS、SNS到底是不是笑话?
- 和基外汇到底是不是骗局?看得懂的点个赞
- 到底是不是太胖了
- 我们到底是不是产品经理
- L1-031. 到底是不是太胖了