# XTU 1237 Magic Triangle(几何)

## Magic Triangle

Accepted : 98   Submit : 232
Time Limit : 1000 MS   Memory Limit : 65536 KB

## Magic Triangle

### Problem Description:

Huangriq is a respectful acmer in ACM team of XTU because he brought the best place in regional contest in history of XTU.

Huangriq works in a big company in Guangzhou now, all things goes well but the mosquitos are too disturbing. Mosquito net and mosquito-repellent incense are useless for this mosquito city.

And finally he decides to use magic to kill them. He make a magic regular triangle as the picture shows. While the most proper position to launch magic is not always the center of circle. In order to make everything smoothly, Huangriq needs to get the value of . And he already get two of them, can you help him to figure out the rest one?

### Input

The first line contains a integer T(no more than 10000), which indicates the number of test cases. In the following T lines, each line contains two integers a and b () indicating the two angle Huangriq has already got.

### Output

For each test case, output the rest angle's value with two digits after a decimal point in one line.

1
30 30

### Sample Output

30.00

#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
#define pi 3.1415926
int main()
{
int T;
double x,y,z;
double q=pi/180;
scanf("%d",&T);
while(T--)
{
scanf("%lf %lf",&x,&y);
z=(sin(x*q)*sin(y*q))/(sin((60.0-x)*q)*sin((60.0-y)*q));
z+=1.0/2.0;
z=z*2.0/(sqrt(3.0));
z=1.0/z;
z=atan(z);
z=z*180/pi;
printf("%.2lf\n",z);
}
return 0;
}


#### XTU1237 Magic Triangle（几何）

2016-04-07 19:51:53

#### 学习Jonathan Shewchuk的Triangle：分治法中三角形的几何信息和拓扑信息的操作

2014-09-04 18:50:16

#### XTU 1237 Prime Twins

2016-06-14 11:56:27

#### XTU 1237 计算几何

2015-06-14 21:52:49

#### 史上最难的初等几何问题？

2007-12-05 00:54:00

#### XTU 程序设计实践模拟考试题1

2016-06-16 21:36:43

#### Magic Triangle

2014-05-20 13:13:25

#### Intel(R) Extreme Tuning Utility（XTU）设置调试教程

2017-03-25 22:04:01

#### XTU 1180 triangle

2017-12-05 14:26:51

#### HDU1237(栈的简单应用以及巧解的方法)

2016-03-01 22:54:37