Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

0MS秒杀(附代码)最简朴算法

Posted by zyx980506 at 2010-03-30 21:30:30 on Problem 1005
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator