uva 375
来源:互联网 发布:河南软件集成商 编辑:程序博客网 时间:2024/06/05 23:23
题意:给你等腰三角形的高和底,求在半径不小于给定值的时候,连续内切圆的周长和 ,水题,画图就可以做出来了
#include <iostream>#include <cstdio>#include <cstring>#include <cmath>using namespace std;int main(){ double b,h,l,sum,temp,r; double PI = acos(-1.0); int t; scanf("%d",&t); while (t--) { sum = l = r = 0 ; scanf("%lf%lf",&b,&h); while (1) { l = atan(h/(b/2)); r = tan(l/2)*b/2; if (r < 0.000001 ) break; sum += 2*PI*r; b = (h-2*r)/h*b; h = h - 2 * r ; } printf("%13.6lf\n",sum); if( t ) printf("\n"); } return 0 ;}
- UVA 375
- uva 375
- UVA 375
- uva 375(数学)
- uva
- UVA
- UVA
- UVA
- uva
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- hdu 4649 Professor Tian 多校第五场
- UITableView的使用大全
- 高质量c/c++之return语句
- Poj 2778 DNA Sequence
- C#学习笔记11:窗口
- uva 375
- Lesson 2 Sorry,sir.
- strictmode使用及分析
- Inflate()---Android之Inflate()方法用途
- grep的使用方法
- Python连接mysql提示old (insecure) passwords is not supported
- Android系统信息获取 之四:系统语言信息获取
- Latent Dirichlet Allocation
- UDP广播