---
title: "P1005 I Think I Need a Houseboat -- 水题"
author: "lethorld"
date: "2012-01-30T16:14:31Z"
tags: []
categories: ["编程语言"]
slug: "p1005-i-think-i-need-a-houseboat"
draft: false
lastmod: "2012-01-30T16:14:31Z"
id: 1384954
url: "https://lethorld.iteye.com/blog/1384954"
---

```c++

#include <stdio.h>
#include <stdlib.h>

double pi = 3.1415926535898;
int main(int argc, char *argv[])
{
	int cnt, i;
	float x, y;
	int year;
	scanf("%d", &cnt);
	for (i=1; i<=cnt; i++) 
	{
		scanf("%f %f", &x, &y);
		double temp = pi * (x*x + y*y) / 100.0;
		year = temp;
		year += (temp - year > 0.0) ? 1 : 0;
		printf("Property %d: This property will begin eroding in year %d.\n", i, year);
	}
	printf("END OF OUTPUT.");
	return 0;
}

```