#include<iostream>
using namespace std;
int main(){
int n, u, d;
int distance;
int time;
while(cin>>n>>u>>d && n != 0){
distance = n;
time = 0;
while(distance > 0){
distance -= u;
time += 1;
if(distance > 0){
distance += d;
time += 1;
}
}
cout<<time<<endl;
}
}
hdoj1049简单题、模拟题
最新推荐文章于 2018-07-27 15:05:03 发布