poj 2276 Model Rocket Height

公式题
#include <stdio.h>
#include 
<math.h>

const double pi=3.141592653;
double d, H, e=0.00000001;

int main()
{

    scanf("%lf%lf"&d, &H);
    
double a, b, c, h;
    
while ( scanf("%lf%lf%lf"&a, &b, &c), a > e && b > e && c > e )
    {
        a
=tan(a/180*pi);
        b
=tan(b/180*pi);
        c
=tan(c/180*pi);
        h
=H+d*sqrt(2.0/(1/a/a+1/c/c-2/b/b))+0.49999999;
        
int t=h;
        printf(
"%d\n", t);
    }
    
return 0;
}

posted on 2011-08-15 00:20 purplest 阅读(232) 评论(0)  编辑 收藏 引用 所属分类: others


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


<2011年8月>
31123456
78910111213
14151617181920
21222324252627
28293031123
45678910

导航

统计

常用链接

留言簿

随笔分类(70)

随笔档案(68)

ACMer

搜索

最新随笔

最新评论