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

Re:两组数据的答案都对了,为什么还WA?帮帮忙。

Posted by talabanr at 2008-05-10 08:27:47 on Problem 1922
In Reply To:两组数据的答案都对了,为什么还WA?帮帮忙。 Posted by:woaixiyuan at 2008-03-15 15:39:30
> #include<stdio.h>
> #include<stdlib.h>
> main()
>   {
>     int i,n,v,t;
>     float temp1,temp2,fast=999999999;
>     while(scanf("%d",&n)==1)
>       {
>         if(n==0) exit(0);
>         for(i=0;i<n;i++)
>           {
>             scanf("%d %d",&v,&t);
>             if(t>0)
>               {
>                 temp1=(4.5/v)*3600+t;
>                 temp2=(4.5*3600)/v+t;
>                 if(temp1>temp2) temp1=temp2+1;
>                 if(temp1<fast) fast=temp1;
>               }
>           }
>         printf("%.f\n",fast);
>       }
>   }
>           

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