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.
My C# solution passes 'BasicTest' and 'DoubleTest' but fails on 'Random Tests.' It would be nice to have a broader description.
This comment is hidden because it contains spoiler information about the solution
In order to use
Math
, you need to importSystem
withusing System
or use a fully qualified nameSystem.Math
.The C# apparently can not use Math.Abs, it should be able to.
I tested my current code code in Visual studio, with the test cases and it works.
Approved
python new test framework is required. updated in this fork
Wow, thanks! That explains it.
The problem is rather that the way the perfs are measured is biased ("like usual"...?)
Considering the inputs used, the VERY GREAT MAJORITY of the outputs are -1. That means that what is measured is actually:
So, yeah, v2 is ofc a tiny bit slower.
Now, if you try with a perfect square as input for each call, the result will be the opposite:
I know that this is old, but why is it slower? Does the assignment really add more time than recalculating the sqrt?
Approved some time ago
Ruby 3.0 should be enabled.
Maybe add a test for [1,1,-1,-1, ... random !=0 ...] (Ruby)?
Several solutions should fail.
This calulates
sqrt(sq)
twice. Is it more efficient to lets = sqrt(sq)
and then uses
?This comment is hidden because it contains spoiler information about the solution
Hi. It was said
I have no idea how to specify this case by another way :)
Loading more items...