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.
some languages do, some dont. re-raising here with a list of affected languages
the tests suite should use approximate equality in:
other languages are OK
Yes, it was.
it looks fine to me, perhaps it was patched at some point, can you check if it's ok now ?
OP is gone and his latest code passes the kata. The C++ tests suite does take care of printing the actual/expected with enough decimals. Closing as lacking details.
It is the rounded result that is compared to the expected solution with fuzzy equality. You have to round the number yourself. And ± 1e-9 is more precise than ± 1e-2, not less.
(Asking for rounded results is bad practice, but it's too late to change the kata now).
yeah i just realized, took me some time but its actually pretty obvious. should probably have waited a little before commenting
.... but it's exactly this, there's not much more to this problem. You are given the lenght of the arc A. This is enough to calculate the area of the red square. Your task is to figure out how, and code the solution.
It might be not immediately obvious how to use the length of the arc to get to the area of the square, but this is what users are expected to figure out.
the instructions are way to vague, what am i even supposed to do with the arc length? it just says "calculate the area of the square, also you have this arc length, have fun!"