CF630P.Area of a Star

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost that depends on the area of gold-plating. Write a program that can calculate the area of a star.

A "star" figure having n>=5n>=5 corners where nn is a prime number is constructed the following way. On the circle of radius rr nn points are selected so that the distances between the adjacent ones are equal. Then every point is connected by a segment with two maximally distant points. All areas bounded by the segments parts are the figure parts.

输入格式

The only line of the input contains two integers nn ( 5<=n<10^{9} , nn is prime) and rr ( 1<=r<=1091<=r<=10^{9} ) — the number of the star corners and the radius of the circumcircle correspondingly.

输出格式

Output one number — the star area. The relative error of your answer should not be greater than 10710^{-7} .

输入输出样例

  • 输入#1

    7 10
    

    输出#1

    108.395919545675
首页