推公式 HDU 2552

T 给你2个值 求另外一个 需要推一下

tan(a+b)=(tan(a)+tan(b))/(1-tan(a)*tan(b));

等式左右取tan

tan(atan(a))=a

1/s=tan(...)=(1/u+1/v)/(1-1/(uv));

最后推出 那个式子等于1

#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<math.h>

using namespace std;

#define MAXN 105

int main()
{
    int t;
    scanf("%d",&t);
    while(t--)
    {
        double s,u;
        scanf("%lf%lf",&s,&u);
        printf("%d\n",1);
    }
    return 0;
}

 

posted on 2016-12-29 20:52  HelloWorld!--By-MJY  阅读(115)  评论(0编辑  收藏  举报

导航