GYM 101350J. Lazy Physics Cat

本题是一道简单的数学问题,需要根据给定的距离L和角度A计算三角形右侧阴影部分与圆周之间的面积。输入包括距离L和角度A,输出为精确到六位小数的阴影区域面积。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

J. Lazy Physics Cat

题目描述

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.

样例

inputCopy
3
1 90
2 180
10 30
outputCopy
0.285398
6.283185
1.179939

题意

简单水题,,

AC代码

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值