poj 1005
来源:互联网 发布:js常用正则表达式大全 编辑:程序博客网 时间:2024/06/05 13:26
#include <iostream>#include <vector>int main(){int i, n;std::vector<float> v;std::cin>>n;v.resize(n*2);for(i=0; i<n; i++)std::cin>>v[i*2]>>v[i*2+1];for(i=0; i<n; i++){std::cout<<"Property "<<i+1<<": This property will begin eroding in year "<<int((v[i*2]*v[i*2]+v[i*2+1]*v[i*2+1])*3.14/100+1)<<".\n";}std::cout<<"END OF OUTPUT.";return 0;}
11068636dragoo11005Accepted244K0MSC++388B2012-12-01 16:20:01
做这题的时候巨水,还不如小学生,
刚开始居然用max(x,y)*max(x,y)来算,后来Wrong answer,习惯用百度,结果是x*x+y*y,测试用例(25.0,25.0)就得侵蚀40年,而非25年
参考:http://blog.sina.com.cn/s/blog_894066430100tf1n.html
- POJ 1005
- POJ-1005
- POJ 1005
- poj 1005
- POJ 1005
- POJ 1005
- POJ 1005
- POJ-1005
- POJ 1005
- poj 1005
- POJ 1005
- poj 1005
- poj 1005
- POJ 1005
- poj 1005
- poj 1005
- poj 1005
- POJ-1005
- 2012-12-1
- intel hd3000 本 在 64位 ubuntu10.04 下 液晶亮度无法调节 的解决之道(亲测)
- void的意义
- hdu 1251 字典树的水题
- linux/windows 下kill某个pid的进程
- poj 1005
- Invent Your Own Computer Games with Python(第二版)(第一章(中))
- AC 自动机 水题 hdu 3065
- android 获取屏幕高度和宽度的方法需要注意的问题
- 字符串中第一个只出现一次的字符
- C#.获取当前网络的ip.多网卡环境
- 玩儿转C语言:声明和定义(1)
- The server does not support version 3.0 of the J2EE Web module specification
- aapt的常用命令