POJ I Think I Need a Houseboat
I Think I Need a Houseboat
思路:距离问题,一道水题
代码:
#include <iostream> #include <cmath> using namespace std; #define PI 3.1415 int main() { int k, a = 1, year; double s, x, y; cin >> k; while (k--) { cin >> x >> y; s = (PI / 2)*(x*x + y*y); year = s / (double)50 + 1; cout << "Property " << a++ << ": This property will begin eroding in year " << year << "." << endl; } cout << "END OF OUTPUT." << endl; system("pause"); return 0; }