http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1049
#include <stdio.h> #include <math.h> const double PI = 3.1415927; int main() { int n, i = 1; int year; double x, y, radius, area; scanf("%d", &n); while(n--) { scanf("%lf%lf", &x, &y); radius = x * x + y * y; area = PI * radius / 2.0; year = (int)ceil(area/50.0); printf("Property %d: ", i++); printf("This property will begin eroding in year %d.\n", year); } printf("END OF OUTPUT.\n"); return 0; }