poj1005 I Think I Need a Houseboat
这题目只要读懂了意思就好做了,先求出来(0.0)到(x.y)的距离为r,然后求出来以r为半径的半圆的面积,然后再用这个面积除以50,再向上取整就可以啦。
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#define eps 0.000000001
#define pie 3.1415926
int main(){
int t;
double res;
double area;
double r;
double x,y;
int cnt=;
scanf("%d",&t);
while(t--){
scanf("%lf%lf",&x,&y);
r=sqrt( x*x+y*y );
area=(pie*r*r)/;
res=area/50.0;
printf("Property %d: This property will begin eroding in year %d.\n",cnt++,(int)ceil(res));
}
printf("END OF OUTPUT.\n");
return ;
}
poj1005 I Think I Need a Houseboat的更多相关文章
- 【POJ1005】I Think I Need a Houseboat
说是计算几何,其实是一道水题.直接算半圆面积即可. #include <iostream> #include <cstdlib> #include <cstdio> ...
- 北大poj-1005
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 99271 Acce ...
- poj 1005:I Think I Need a Houseboat(水题,模拟)
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 85149 Acce ...
- I Think I Need a Houseboat 分类: POJ 2015-06-11 17:52 12人阅读 评论(0) 收藏
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 92090 Acce ...
- [POJ] #1005# I Think I Need a Houseboat : 浮点数运算
一. 题目 I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 97512 ...
- OpenJudge/Poj 1005 I Think I Need a Houseboat
1.链接地址: http://bailian.openjudge.cn/practice/1005/ http://poj.org/problem?id=1005 2.题目: I Think I Ne ...
- 每天一道算法_6_I Think I Need a Houseboat
今天的题目是I Think I Need a Houseboat 如下: Description Fred Mapper is considering purchasing some land in ...
- I Think I Need a Houseboat
I Think I Need a Houseboat Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java ...
- HDU1065 I Think I Need a Houseboat 【数学递推】
I Think I Need a Houseboat Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Ja ...
随机推荐
- eclipse升级,导入旧版eclipse的插件[转]
启动 eclipse.菜单 File => import … => Install => From existing Installation, 点确定, 就会弹出对话框, 浏览选择 ...
- RightBarButon
//rightBar button UIButton *rightButton = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 34, 34)]; ...
- 九度OJ1077
#include <stdio.h> #include<stdlib.h> //最大子序列和问题,动态规划,公式为d(n)=max{d(n-1),0}+A[i] typedef ...
- IGeoDatabaseBridge2.GetLineOfSight
IGeoDatabaseBridge2.GetLineOfSight Method Returns a line-of-site indicator interpolated from the TIN ...
- linux locate: command not found
装好系统发现使用locate查找文件,提示 -bash: locate: command not found yum install locate 无效,看来locate不是软件名称 [root@ce ...
- 页面设计--CheckBoxList
CheckBoxList 下拉多选控件 控件属性如下图: 取值设置:多选只能从数据库表中来获取:支持过滤条件设置(支持权限条件值.控件值条件.系统变量值等做为过滤条件) web效果显示:
- OC基础(13)
内存管理简介 引用计数器 dealloc方法 野指针\空指针 *:first-child { margin-top: 0 !important; } body > *:last-child { ...
- css3实现小米商城鼠标移动图片上浮阴影效果
今天在编程爱好者编码库看见一个好玩的程序,代码如下. <!DOCTYPE html> <html> <head> <meta charset=&quo ...
- Windows下cwRsync搭建步骤
文章(一) CwRsync是基于cygwin平台的rsync软件包,支持windows对windows.windows对Linux.Linux对windows高效文件同步.由于CwRsync已经集成了 ...
- android界面布局技巧(一)
(1)//得到手机的宽高 Display display = getWindowManager().getDefaultDisplay(); int screenWidth = display.get ...