杭电1049题解

来源:互联网 发布:枪神纪刷枪软件2017 编辑:程序博客网 时间:2024/05/21 15:06
#include<iostream>using namespace std;int main(){int height,v,rest;while(1){cin>>height>>v>>rest;if(height==0)      break;    if(height<=v)  cout<<1<<endl;else{int sum=1;while(sum*(v-rest)<height-v)   sum++;cout<<sum*2+1<<endl; }  } }
水题