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.
I've tested your code and it passed at 5.5 second interval, closing.
Codewars always takes a little longer than normal programmes.
issue not clear, OP can reraise one if he encounters the issue (in a more specific manner)
PHP working for me. Maybe they fixed it.
No, the control function in PHP does round the results, your problem must be something else.
I see the error message is showing the results without rounding, that's weird. But you can see the same behaviour in the sample tests.
For example, for this test:
Returning a value without rounding, you'll get this error message:
And you can see the expected value is rounded to two decimals in the assertion.
Despite description saying "Return the result rounded to two decimals." the PHP random tests do NOT round their answers to 2 decimal places, and as such I keep getting errors.
The PHP version seems to have an issue with the final test, I checked the time taken and output whats happening to ensure the checks are completed within the 12 second time frame, yet it still thinks my code is taking too long?
The PHP translation does not seem to work, even just returning the raw string from the first test doesnt return as successful.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
That´s quite a workaroud. Liked it. Very creative.