注意最后那个输出即可,,, /*贪心,骑车问题.. * * * */ #include <stdio.h> #include <string.h> #include <iostream> using namespace std; int main(void) { int n,speed;double time; double min; while(cin>>n) { if(!n) break; min = 999999.0; for(int i=0;i<n;i++) { int tmp; cin>>speed>>tmp; time = (double)tmp; if(time<0) continue; else { //cout<<"time="<<time<<endl; time=16200.0/speed+time; //cout<<"speed="<<speed<<endl; if(time<min) min=time; } } if(min-(int)min>0) min+=1; printf("%.0lf/n",min); } return 0; }