标签:
Description
Input
Output
Sample Input
Sample Output
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int main() { #ifdef CDZSC_OFFLINE freopen("in.txt","r",stdin); #endif int n,u,d,sum,ans; while(scanf("%d%d%d",&n,&u,&d)&&n!=0&&u!=0&&d!=0) { sum=0,ans=0; while(sum+u<n) { sum+=u-d; ans+=2; } printf("%d\n",ans+1); } return 0; }
标签:
原文地址:http://www.cnblogs.com/Wing0624/p/4243832.html