OJ-Problems-Source/HDOJ/1049_autoAC.cpp

8 lines
187 B
C++
Raw Normal View History

2016-08-12 10:14:21 +08:00
#include<stdio.h>
int main(){
int n,u,d,t;
while(scanf("%d%d%d",&n,&u,&d)!=-1&&n)
printf("%d\n",(n-u)%(u-d)?(2*((n-u)/(u-d)+1)+1):(2*((n-u)/(u-d))+1));
return 0;
}