题目链接:https://vjudge.net/problem/HDU-1049
#include <iostream>
using namespace std;
int main()
{
int n, u, d,i,time;
while(cin>>n>>u>>d)
if(n<100&&d<u)
for (i = 0,time=0; i >= 0; i++)
{
n = n - u;
time++;
if (n <= 0)
{
cout << time<<endl;
break;
}
else
{
n = n + d;
time++;
}
}
}