#include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b, count_ = 1;
char c[10];
while(scanf("%d%s%d", &a, &c, &b) == 3)
{
double R = sqrt(b*b+a*a)/2;
double theta = 2*asin(b/(2*R));
double p = theta*R + a;
printf("Case %d: %.8f %.8f\n", count_++, 200*a/p, 200*b/p);
}
return 0;
}
当我看到这道题时,我的内心是震惊的,这好像少了一个R和ab的关系啊,把题目读了有读,还是百度好了。。。
“You are also told that the sliced circles will be such that they are part of the same circle.”错误在这句话上,话说刘汝佳的翻译也是够误导了,这里的same应该解释为一个,而不是同样的,这句话暗示了两个圆弧的圆心是重合的,而且半径相等。
看出来了这个以后,那就好做啦,求求角度就出来了。