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

过路神牛帮忙看看为什么wa~~~~

Posted by crd721 at 2010-10-21 10:58:39 on Problem 1922
PROGRAM Ride_to_School;
VAR
  num:longint;
  ans:extended;
PROCEDURE init;
  Begin
    read(num);
  End;
PROCEDURE solve;
  Var
    i,v,t:longint;
    tmp:extended;
  Begin
    ans:=maxlongint;
    for i:=1 to num do
      begin
        read(v,t);
        if i>=0 then
          begin
            tmp:=4500.0*3.6/(v)+t;
            if tmp-trunc(tmp)>0 then tmp:=tmp+1;
            if tmp<ans then ans:=tmp;
          end;
      end;
    writeln(trunc(tmp));
  End;
PROCEDURE outit;
  Begin
  End;
BEGIN
  num:=1;
  while num<>0 do
    begin
      init;
      if num<>0 then
        begin
          solve;
          outit;
        end;
    end;
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