您的位置:首页 > 其它

UVA 11646 - Athletics Track

2014-04-27 23:03 375 查看
圆的内角等于外角的两倍

代码如下:

#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;

const double pi=acos(-1);

int main(){
//	freopen("data.txt","r",stdin);
	ios::sync_with_stdio(false);
	double a,b;
	char aa;
	int kase=1;
	while(cin>>a>>aa>>b){
		double alpha=atan(a/b);
		double tmp=(sqrt(a*a+b*b))/a;
		double x=200/(pi*tmp/2-alpha*tmp+1);
		double y=b*x/a;
		cout<<"Case "<<kase++<<": "<<setiosflags(ios::fixed)<<setprecision(5)<<x<<' '<<y<<endl;
	}
	return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: