//水题
#include <bits/stdc++.h>
using namespace std;
int main()
{
int c, v0, v1, a, l;
while (cin >> c >> v0 >> v1 >> a >> l)
{
int day = 0;
if (v0 >= c)
{
cout << 1 << endl;
continue;
}
day++; c -= v0;
int flag = 1;
while (1)
{
c += l;
v0 += a;
if (v0 > v1) v0 = v1;
if (v0 >= c)
{
flag = 0;
cout << ++day;
break;
}
c -= v0; day++;
}
if (!flag) continue;
else cout << day << endl;
}
return 0;
}
CodeForces - 820A Mister B and Book Reading
最新推荐文章于 2020-06-17 11:08:38 发布