#include<stdio.h>
//#include<iostream>
#include<math.h>
//using namespace std;
int main()
{
	  double n,k;
	  while(scanf("%lf%lf",&n,&k)==2)
	  {
		    if(n<=k)
			      printf("2\n");
		    else
			      printf("%.0lf\n",ceil(n*2.0/k));
	  }
}
原文:http://www.cnblogs.com/mycapple-zgs-111411/p/4619628.html