Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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).

  • Custom User Avatar

    Approved

  • Default User Avatar
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.

  • Default User Avatar

    I was wondering how come I've got 8kyu kata in my Unfinished katas... I see. I think I'll keep it there.

  • Default User Avatar

    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.

  • Default User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Same here.

    Update: if this happens to you, copy your code to the clipboard, reset the kata and paste it right back down. Worked.

  • Default User Avatar

    i did the same mistake :) mixing between diameter and radius , One should always focus while reading !

  • Default User Avatar

    Yes, I was wrong. There is no problem with the test cases :)

  • Default User Avatar

    I have removed my issue, maybe I am just too tired, and I have to check it again :D

  • Default User Avatar

    I tried the apothem and multiplyed by two but got a wrong answer

  • Loading more items...