您的位置:首页 > 其它

cf C. Cupboard and Balloons

2014-08-17 20:14 309 查看
http://codeforces.com/contest/342/problem/C

#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std;

__int64 r,h;

int main()
{
while(scanf("%I64d%I64d",&r,&h)!=EOF)
{
__int64 t2=(h/r)*2;
if((h%r)*2<r) t2++;
else if((h%r)*2>=sqrt(3.0)*r) t2+=3;
else t2+=2;
printf("%I64d\n",t2);
}
return 0;
}


View Code
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: