Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
我哭死了,唔唔唔唔唔唔唔唔唔唔唔唔。。。。。。。。。。。少写了一个等号,让我错了几十次!!!!!ft,大家注意了!#include <stdio.h> #include <math.h> int s; int t; int main() { int n; while(scanf("%d",&n)&&n) { double time=1e18; double sum=0; for(int i=0;i<n;i++) { scanf("%d%d",&s,&t); if(t>=0)//这里少写了一个等号,错了几十次,提出来,大家注意!!!! { double d=ceil(4500*3.6/(double)s+(double)t); if(d<time) time=d; } } printf("%.0lf\n",time); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator