3 2
3
规律题!写出几组数据不难发现其中的规律!
AC码:
#include<stdio.h> int main() { int n,k,result; while(~scanf("%d%d",&n,&k)) { result=2*n/k; if(2*n%k) result++; if(result<=1) result=2; printf("%d\n",result); } return 0; }
原文地址:http://blog.csdn.net/u012804490/article/details/26372047