poj-1005-l tanink i need a houseboat
Description
After doing more research, Fred has learned that the land that is being lost forms a semicircle. This semicircle is part of a circle centered at (0,0), with the line that bisects the circle being the X axis. Locations below the X axis are in the water. The semicircle has an area of 0 at the beginning of year 1. (Semicircle illustrated in the Figure.)
Input
Output
Sample Input
- 2
- 1.0 1.0
- 25.0 0.0
Sample Output
- Property 1: This property will begin eroding in year 1.
- Property 2: This property will begin eroding in year 20.
- END OF OUTPUT.
Hint
2.This problem will be judged automatically. Your answer must match exactly, including the capitalization, punctuation, and white-space. This includes the periods at the ends of the lines.
3.All locations are given in miles.
- 输出:输出该坐标会在哪一年年底开始被河水侵蚀。对应每个坐标输出一行,输出结束后输出 “END OF OUTPUT.”
- #include<iostream>
- using namespace std;
- const double pi=3.1415926;
- int main()
- {
- int n;
- cin>>n;
- for(int i=1;i<=n;i++)
- {
- double len,wid;
- double m;
- int mm=0;
- cin>>len>>wid;
- m=pi*(len*len+wid*wid)/2;。//求出整个岛消失的面积
- mm=m/50+1;
- cout<<"Property "<<i<<": This property will begin eroding in year "<<mm<<"."<<endl;
- if(i==n)cout<<"END OF OUTPUT.";
- }
- return 0;
- }
poj-1005-l tanink i need a houseboat的更多相关文章
- POJ. 1005 I Think I Need a Houseboat(水 )
POJ. 1005 I Think I Need a Houseboat(水 ) 代码总览 #include <cstdio> #include <cstring> #incl ...
- 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 ...
- [POJ 1005] I Think I Need a Houseboat C++解题
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 81874 ...
- poj 1005:I Think I Need a Houseboat(水题,模拟)
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 85149 Acce ...
- [POJ] #1005# I Think I Need a Houseboat : 浮点数运算
一. 题目 I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 97512 ...
- poj 1005 I Think I Need a Houseboat
#include <iostream> using namespace std; const double pi = 3.1415926535; int main() { ;; doubl ...
- I Think I Need a Houseboat POJ - 1005
I Think I Need a Houseboat POJ - 1005 解题思路:水题 #include <iostream> #include <cstdio> #inc ...
- I Think I Need a Houseboat POJ - 1005(数学)
题目大意 在二维坐标内选定一个点,问你当洪水以半圆形扩散且每年扩散50单位,哪一年这个点被被洪水侵蚀? 解法 代码 #include <iostream> #include <cst ...
- POJ 1005 解题报告
1.题目描述 2.解题思路 好吧,这是个水题,我的目的暂时是把poj第一页刷之,所以水题也写写吧,这个题简单数学常识而已,给定坐标(x,y),易知当圆心为(0,0)时,半圆面积为0.5*PI*(x ...
- 1005 -- I Think I Need a Houseboat
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 105186 Acc ...
随机推荐
- javascript 正则表达式学习教程
正则表达式 就是用某种模式去匹配一类字串的一个公式 RegExp 对象表示正则表达式 Regular Expression 正则表达式是很多程序设计语法都支持的 //①隐式创建 var regexp ...
- FusionWidgets DrawingPad图
1.数据源 DrawingPad.xml: <?xml version="1.0" encoding="UTF-8"?> <chart bgC ...
- 电脑开机后,就会自动运行chkdsk,我想取消chkdsk,怎么取消
每次开机都自动检查磁盘,检测通过后下次还是一样,NTFS/FAT32分区都有可能有这样的情况,即使重装系统,仍可能出现同样情况,但是硬盘可以通过Dell 随机带的检测程序解决方法:在命令行窗口中 ...
- Error 1313: RETURN is only allowed in a FUNCTION SQL Statement
1.错误描述 14:07:26 Apply changes to rand_string Error 1313: RETURN is only allowed in a FUNCTION SQL St ...
- java.lang.ArrayIndexOutOfBoundsException
1.错误描述 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at com.you.m ...
- 泛型集合、datatable常用数据类型转换Json帮助类
泛型集合.datatable常用数据类型转换Json帮助类 using System; using System.Data; using System.Configuration; using Sys ...
- 异常-----freemarker.template.TemplateException:Error executing macro:mainSelect
1.错误描述 freemarker.template.TemplateException:Error executing macro:mainSelect require parameter:id i ...
- 【原】storm组件(架构层面)
Strom集群遵循从主模式,主与从之间通过Zookeeper协作.架构层面上包括三个组件: 1) Nimbus Node 2)Supervisor Nodes 3)Zookeeper 其中Nimbus ...
- React+webpack-Module Parse failed, Unexpected Character ‘ ’
webpack.config.js中配置: { test: /\.scss$/, loaders: [ 'style-loader', 'css-loader', 'sass-loader' ], / ...
- iOS9 HTTP 网络访问问题
今天升级Xcode 7.0 发现网络访问失败.输出错误信息 The resource could not be loaded because the App Transport Security po ...