uva 11646 - Athletics Track

Original link: http://www.cnblogs.com/james1207/p/3266661.html

Meaning of the questions: FIG runway stadium circle is 400 m, where the same two corner radius of the arc. Aspect ratio rectangle is known a: b, the length and width of seeking specific values.

Note : the center of the arc on the longitudinal axis!

 

#include<iostream>
#include<cstdio>
#include<cmath>

using namespace std;

int main()
{
    double i=1,a,b,w,k,thy,d;
    char c;
    while(cin>>a>>c>>b)
    {
        k=a/b;
        d=b/sqrt(a*a+b*b);
        thy=asin(d)*2;
        k+=thy/d/2;
        w=200/k;
        cout<<"Case "<<i++<<": ";
        printf("%.10lf %.10lf\n",a*w/b,w);
    }
    return 0;
}


 

 

Reproduced in: https: //www.cnblogs.com/james1207/p/3266661.html

Guess you like

Origin blog.csdn.net/weixin_30648587/article/details/94986184