题解:UVA12791 Lap
UVA12791 Lap
思路
速度差为
AC 代码
#include<bits/stdc++.h>
using namespace std;
long long x,y;
int main(){
while(cin>>x>>y){ //题目没有说多少组数据
if(y%(y-x)==0) cout<<y/(y-x)<<endl;//也可以使用ceil()
else cout<<y/(y-x)+1<<endl;
}
return 0;
}
AC 记录