杭电1049
#include <stdio.h>int main (void){int n,u,d,i,s;while(scanf("%d%d%d",&n,&u,&d)!=EOF&&n){s=0;if((n-u)%(u-d)==0)printf("%d\n",(n-u)/(u-d)*2+1);elseif(n-(n-u)/(u-d)*(u-d)>u)printf("%d\n",((n-u)/(u-d))*2+3);elseif(n-(n-u)/(u-d)*(u-d)==u)printf("%d\n",((n-u)/(u-d))*2+1);}return 0;}
补充:软件开发 , C++ ,