Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
0MS秒杀(附代码)最简朴算法var n,i,j,k:longint; r,ansr,x,y:real; begin readln(n); for i:=1 to n do begin readln(x,y); ansr:=sqrt(sqr(x)+sqr(y)); r:=0;k:=0; while r<ansr do begin inc(k); r:=sqrt((1.57*r*r+50)/1.57); end; writeln('Property ',i,': This property will begin eroding in year ',k,'.'); end; writeln('END OF OUTPUT.'); end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator