- #include<iostream>
- using namespace std;
- int main()
- {
- int n,b,u,sum=0,num=0;
- while(cin>>n>>b>>u&&n!=0&&b!=0&&u!=0)
- {
- sum=0;
- num=0;
- while(num<n)
- {
- num=num+b;
- sum++;
- if(num>=n)
- goto end;
- else
- {
- num=num-u;
- sum++;
- }
- }
- end:
- cout<<sum<<endl;
- }
- return 0;
- }
H - Climbing Worm解题报告
最新推荐文章于 2018-09-11 17:29:33 发布