XTU 1237 Magic Triangle(几何)
来源:互联网 发布:关闭139和445端口 编辑:程序博客网 时间:2024/06/06 13:57
Magic Triangle
Accepted : 98 Submit : 232Time Limit : 1000 MS Memory Limit : 65536 KBMagic 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.
Sample Input
1
30 30
Sample Output
30.00
题意:一个圆里有一个正△ABC 给你其中两个角求第三个角#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>#include <cmath>using namespace std;#define pi 3.1415926int 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;}
- XTU 1237 Magic Triangle(几何)
- XTU1237 Magic Triangle(几何)
- XTU 1237 计算几何
- XTU 1180 triangle
- Magic Triangle
- [计算几何]Pku2079-Triangle
- XTU 1237 Prime Twins
- 2015湘潭邀请赛 E.Magic Triangle
- 【暴力几何】#6 A. Triangle
- UVa 11437 Triangle Fun(几何)
- Triangle Fun - UVa 11437 几何
- uva 11437 - Triangle Fun(几何)
- Triangle Hazard - UVa 12165 几何
- uva 194 - Triangle(几何)
- CodeForces 18A Triangle (几何)
- [POJ2954]Triangle(计算几何)
- uva 11437 Triangle Fun (简单计算几何)
- UVA 11437 - Triangle Fun 向量几何
- iOS - 自动计算cell的高度(iOS8 Auto-sizing)
- leetcode283
- 代码规范:android版
- 聚合函数
- POJ2019 Cornfields(记忆化枚举版)
- XTU 1237 Magic Triangle(几何)
- linux stat函数
- cocos2d-x开发常用工具
- web前端设计师们常用的jQuery特效插件汇总
- SAP转储订单(STO)
- c++之<assert.h>头文件的用法
- Ubuntu挂载u盘
- 团体程序设计天梯赛-练习集 L2-001 紧急救援 dijkstra 解题报告
- 【JS 设计模式 】观察者模式之实时改变页面中的金额数