mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
23 lines
462 B
C++
23 lines
462 B
C++
|
#include<iostream>
|
||
|
#include<cmath>
|
||
|
using std::cin;
|
||
|
using std::cout;
|
||
|
using std::endl;
|
||
|
int main() {
|
||
|
while(true) {
|
||
|
int N;
|
||
|
cin>>N;
|
||
|
if(!N)
|
||
|
break;
|
||
|
double mint=1e36;
|
||
|
double v,t0;
|
||
|
while(N--) {
|
||
|
cin>>v>>t0;
|
||
|
if(t0>=0&&ceil(t0+4500*3.6/v)<mint)
|
||
|
mint=ceil(t0+4500*3.6/v);
|
||
|
}
|
||
|
cout<<static_cast<long>(mint)<<endl;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|