Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
Surely it's really easy as a coding issue but only if you are familiar with the math formula (or allow yourself to google it).
Approved
C Translation
This comment is hidden because it contains spoiler information about the solution
I would rewrite it to just "Find the radius of the largest circle that fits inside a regular polygon." since the whole working for a box making company just adds confusion.
I was wondering how come I've got 8kyu kata in my Unfinished katas... I see. I think I'll keep it there.
Consider the circular sector of central angle α between two successive points of tangency. One has
area(circular sector)length(circular arc)=12αr2αr=r2 ,
and for the corresponding part of the polygon (a kite) one has
area(kite)length(outer edges)=2⋅12r⋅rtanα22rtanα2=r2
as well. Now, if ai=r2bi (1≤i≤n) then
∑iai∑ibi=∑ir2bi∑ibi=r2 ,
and this is valid for the union of circular sectors as well as for the union of kites.
I would say, in this kind of situation where you challenge yourself for your own sake, not for some kind of prize you will take away from another person more adept; the definition of cheating would be dependent on the individual. If you are not interested in mathematics, it might not be considered cheating if you google specific formulas.
But for someone like me for example, I would consider myself cheating if I ask google insead of figuring the formula out by myself using pen and paper. Those Formulas are proven by human beings like us. They are not magical things that you should imperatively memorize because there is no way of proving them.
This comment is hidden because it contains spoiler information about the solution
Same here.
Update: if this happens to you, copy your code to the clipboard, reset the kata and paste it right back down. Worked.
i did the same mistake :) mixing between diameter and radius , One should always focus while reading !
Yes, I was wrong. There is no problem with the test cases :)
I have removed my issue, maybe I am just too tired, and I have to check it again :D
I tried the apothem and multiplyed by two but got a wrong answer
Loading more items...