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.
Your code fails for cases like
n = 2, m = 2
whereby the correct answer is0
, but your code returnsINVALID
gracias
estaba perdido
las funciones no las agarra
The arc intesects with the top-right and bottom-left of the square which can only happen if the length of a side on the square and the radius of the circle is equal.
Easiest way to see it is to imagine you had 4 of the same tiles in different orientation so that the arc makes a circle. You can see that the radius of that circle is the same length as the side of the square.
"for" loops are the fastest. Any other function does that internally anyway.