1049

1 #include<iostream>
2 using namespace std;
3 int main() {
4 int n,u,d;
5 while(true){
6 cin>>n>>u>>d;
7 if(n==0)
8 break;
9 else {
10 int tem=0,v=0;
11 tem=n-u;
12 v=u-d;
13 if(tem%v!=0) {
14 int a=0;
15 a=tem/v;
16 cout<<2*(a+1)+1<<endl;
17 continue;
18 }
19 else {
20 int b=0;
21 b=tem/v;
22 cout<<2*b+1<<endl;
23 continue;
24 }
25 }
26 }
27 return 0;
28 }
posted @ 2011-04-15 17:24  左手写诗  阅读(161)  评论(0编辑  收藏  举报