| 比赛 | Mister B的奇妙生活 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | B先生和阅读 | 最终得分 | 100 |
| 用户昵称 | Arrow | 运行时间 | 0.003 s |
| 代码语言 | C++ | 内存使用 | 0.31 MiB |
| 提交时间 | 2017-09-08 19:11:14 | ||
#include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;
int c,v0,v1,a,p;
int ans=0;
void work()
{
int v=v0;
while(c>0)
{
c-=v;
ans++;
if(v<v1)
v+=a;
if(ans>1)
c+=p;
}
}
int main()
{
freopen("MrBA.in","r",stdin);
freopen("MrBA.out","w",stdout);
scanf("%d%d%d%d%d",&c,&v0,&v1,&a,&p);
work();
printf("%d\n",ans);
return 0;
}