POJ 1005 & ZOJ 1049 & UVA 2363
2017-07-03 14:20
302 查看
思路:求出在x,y点的面积,除以每年的腐蚀面积,向上取整,使用ceil()函数
#include <iostream> using namespace std; #define PI 3.141592653 int main() { int test_num; cin >> test_num; double x,y; double area; int year; for(int i = 1 ; i < 4000 = test_num; i++) { cin >> x; cin >> y; area = (x * x + y * y) * PI / 2; year = int(area/50)+1; cout << "Property " << i <<": This property will begin eroding in year " << year <<"." <<endl; } cout << "END OF OUTPUT" << endl; }
相关文章推荐
- hdu 4071& poj 3873 & zoj 3386 & uva 12197 Trick or Treat 三分法
- UVALive2363 POJ1005 HDU1065 ZOJ1049 I Think I Need a Houseboat【数学计算+水题】
- POJ 2149 & ZOJ 2267&UVA 1337&UVALive 3192 Inherit the Spheres
- UVa 714 & POJ 1505 & ZOJ 2002 - Copying Books
- POJ 1903 & ZOJ 2469 & UVA 1326 Jurassic Remains (部分枚举)
- zoj 2016 && poj 1386 && uva 10129 Play on Words
- POJ 2196 & ZOJ 2405 & UVA 3199
- POJ 1903 & ZOJ 2469 & UVA 1326 Jurassic Remains (部分枚举)
- UVa 10714 & POJ 1852 & ZOJ 2376 - Ants
- UVa 439/HDU 1372/POJ 2243/ZOJ 1091 Knight Moves(BFS&纯数学方法)
- poj 2029 && zoj 1716 Get Many Persimmon Trees
- ZOJ 1133 & POJ 1142 Smith Numbers
- zoj 1943 || poj 2254 || UVA 535 Globetrotter ( UVA卡精度了 )
- poj 1032 && zoj 1265 Area
- zoj 1892 || poj 2504 || UVA 10577 Bounding box
- poj 1384 & zoj 2014 Piggy-Bank(完全背包)
- zoj 1886 || poj 2540 || UVA 10084 Hotter Colder
- ZOJ1005 POJ1606 Jugs 数论法
- zoj 1031& poj 1084 (Dancing Links 重复覆盖)
- poj 3268 Silver Cow Party & zoj 2008 Invitation Cards