All right, guys.
Simple polygon, I'm betting it's time to take a look at the card.
Let's see what I did here.
So it's accepted.
Everything's fine.
Basically, the code is really simple, straightforward for each and every test.
I just read em, which is the number of not to cross then is the number of entries.
And basically what I need in that formula, you can Google it car.
It's really a good exercise for practicing.
You can Google something like the longest diagonal in our regular polygon of weave to crust and sides
or just the regular polygon.
And you will find on all the sites the formula.
So the formula of that longest diagonal was basically this one, which is one divided by sign of angle
crust B.
Divided by one hundred and eighty degrees.
Why do I do that?
Is that.
The formula is just one divided by sign of the angle.
But as you know, in C++, when you compute the sign of some angle, you need to computing in.
Right.
So our angle that we have first computed here, double angle, which is one hundred and eighty degrees
divided by two crust N, it's the number of degrees that each angle from this polygon has.
But then you have to convert this number from degrees to radians.
So you do angle crust be divided by 180.
Then when you have this radians you can then apply the same function.
So you have one divided by site.
Right?
And because this is the length of that longest diagonal, remember, I have the longest diagonal.
I have the side which has length one.
And I have to find this one right.
This one is basically obscured there of this one squared minus this one squared.
Right.
So this one squared is actually that one divided by the side.
Right.
And when I have to, like, subtract from one thing squared, another thing squared.
You know, that A squared minus B squared is actually A minus B, everything crossed A plus B rights
or A minus B crossed A plus B.
This is actually what it is here.
Right.
So this is A minus B crossed A plus B, right.
And of course, a security of all of this is the length of that.
Don't forget, we have to print it.
We have the precision of nine digits.
So all we do here is see outside procedure nine of N.
So that's it.
Right.
All right.
So for each test, just compute the angle in degrees.
Remember that when you want to play functions like sine course tangent, you convert it into radians.
So we just converted here into radians.
And then using the Pythagoras theorem and the formula that you are going to find the line, we just
do this and print it.
We have the precision of nine.
And that's it, guys.
So on the next one.