Lazy Physics Cat Gym
来源:互联网 发布:软件国画山水价格 编辑:程序博客网 时间:2024/06/07 23:02
Physics cat likes to draw shapes and figure out their area. He starts by drawing a circle. Then inside the circle, he draws the triangle X, Y, Z - where Y is the center point of the circle, and X and Z touch the circumference of the circle. Please note that points X and Y always have the same x-coordinate.
Given L (the distance between Points X and Y) and A (the angle XYZ in degrees); help physics cat find the shaded area between the right side of the triangle and the circumference of the circle. And when we say help, we mean do all the work for him.
The first line of input is T – the number of test cases.
The first line of each test case is integers L and A (1 ≤ L ≤ 1000) (1 ≤ A ≤ 180).
For each test case, output on a line the area of the shaded region rounded to 6 decimal places.
31 902 18010 30
0.2853986.2831851.179939
#include<iostream>#include<cstdio>#include<algorithm>#include<cstring>#include<cmath>using namespace std;#define ll long longconst int maxn=1e5+5;const int INF=0x3f3f3f3f;#define pi 3.1415926int main(){ int T; scanf("%d",&T); while(T--) { int r,x; scanf("%d%d",&r,&x); double ans; double k=(x*pi)/180; ans=(x*pi*r*r)/360-0.5*r*r*sin(k); printf("%.6lf\n",ans); } return 0;}
- Lazy Physics Cat Gym
- 手机游戏 cat physics 分数记录
- gym 101137 L Lazy Coordinator(概率)
- physics
- physics
- physics
- lazy
- lazy
- cat
- cat
- cat
- cat
- cat
- cat
- cat
- cat
- cat
- cat
- HTTP请求GET和POST的区别
- JSON格式
- 面向对象
- Android Studio:Minimum supported Gradle version is 3.3. Current version is 3.2 问题解决
- BZOJ 736 [CTSC1999][网络流24题] 星际转移
- Lazy Physics Cat Gym
- CAS 实现单点登录(一):环境搭建、部署及简单使用
- 4.16 盒子模型浅谈
- Boostrap的form-group和form-control
- c++作业4
- 卡尔曼滤波
- 克隆二叉树
- 中毒的父母
- java 网页读取与存储