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 piaofushi919 at 2005-01-08 12:23:17 on Problem 1922
#include<stdio.h> 
#include<math.h>
void main(){
    int N,a,b;
    double time;
    scanf("%d",&N);
    while(N!=0){
        int min=0;
        for(int i=1;i<=N;i++){
            scanf("%d %d",&a,&b);
            if(b>=0)
                time=(double)4500*3.6/a+b;
            if(min==0||min>time)
                min=(int)ceil(time);
        }
        printf("%d\n",min);
        scanf("%d",&N);
    }
}

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