C++代码
- /*
- Title: I Think I Need a Houseboat
- Problem URL: http://acm.zju.edu.cn/show_problem.php?pid=1049
- Author: Moqi
- Date: 2007-12-31
- Description:
- */
- #include <stdio.h>
- #include <math.h>
- int main()
- {
- int i, j, n;
- float d, a, b;
- scanf("%d", &n);
- for(i = 1; i <= n; i++)
- {
- scanf("%f %f", &a, &b);
- d = a * a + b * b;
- j = d * 3.14159 / 100;
- j = j + 1;
- printf("Property %d: This property will begin eroding in year %d.\n", i, j);
- }
- printf("END OF OUTPUT.\n");
- return 0;
- }