]]>POJ 1005 I Think I Need a Houseboathttp://www.shnenglu.com/vontroy/archive/2010/10/02/128345.htmlVontroyVontroySat, 02 Oct 2010 11:57:00 GMThttp://www.shnenglu.com/vontroy/archive/2010/10/02/128345.htmlhttp://www.shnenglu.com/vontroy/comments/128345.htmlhttp://www.shnenglu.com/vontroy/archive/2010/10/02/128345.html#Feedback0http://www.shnenglu.com/vontroy/comments/commentRss/128345.htmlhttp://www.shnenglu.com/vontroy/services/trackbacks/128345.html
/**//****************************************** 璁鵑渶瑕乶騫?br />璁懼崐鍦嗛潰縐負 S錛屽崐寰勪負 r S = 50 * n; S = (PI * r * r) / 2; 瑙e緱 n = (PI * r * r ) / 100; 鎵緇欑偣鍒板師鐐硅窛紱?nbsp;len = sqrt( x * x + y * y ); 浠en = r鍗沖彲瑙e嚭 n *******************************************/ #include <iostream> #include <cstdio> #include <cmath> constdouble PI =3.1415927; usingnamespace std; int main() { double x, y; int cnt; cin >> cnt; int pro =1; while( cnt-- ) { cin >> x >> y; double len = sqrt( x * x + y * y ); int n = (PI * len * len ) / (100*1.0); printf("Property %d: This property will begin eroding in year %d.\n", pro++, n +1); } cout <<"END OF OUTPUT.\n"; return0; }