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

为什么那么慢?

Posted by boygod at 2006-03-04 19:42:27 on Problem 1922
#include <stdio.h>
int main()
{
 double v,addt,t;
 long int i,n,min,t1;

 while (1)
   {
     scanf ("%ld",&n);
     if (n==0)
       break;
     min=30000;
     for(i=1;i<=n;i++)
        {
         scanf ("%lf%lf",&v,&addt);
         if(addt<0)
          continue;
         t=4500*3.6/v+addt;
         if(t-(long int)t==0)
            t1=(long int)t;
         else
            t1=(long int)t +1;
         if(t1<min)
           min=t1;    
        }
     printf ("%ld\n",min); 
   }
}

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