uva 11646 - Athletics Track

来源:互联网 发布:余文乐有淘宝店吗 编辑:程序博客网 时间:2024/04/29 01:01
#include <iostream>#include <stdio.h>#include <string.h>#include <algorithm>#include <vector>#include <math.h>using namespace std;int main(){    int cas = 0;    double a, b;    while( ~scanf( "%lf : %lf", &a, &b ) )    {        double x = 400.0 / ( 2.0 + ( 2.0 * atan( b / a ) * sqrt( a*a + b*b ) ) / a );        double y = x * b / a;        printf( "Case %d: ", ++cas );        printf( "%.10f %.10f\n", x, y );    }    return 0;}

原创粉丝点击