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.
It's bad practice, but I love how optimized it is.
excelente me sorprende a veces la capcidad en la que los codigos de php se pueden comprimir a tal punto en que solo ocupan una sola linea de codigo.
Currently my code will sometimes pass, sometimes failed.
And if it failed, the wrong one would be like this:
Or like this:
Then how about 23135?
56.385
round down to56.38
.23.135
round up to23.14
.By the way, these two message is from different code.
Resolved.
56385ms
is56.385s
, as you can see in example1.555
should not be rounded to1.56
. So the answer for this will be56.38s
.(eg. 1.555 => 1.55, but 1.556 => 1.56)
What? Round up 6!? OK...56385:
expected '56.39s' to equal '56.38s'
23135:
expected '23.13s' to equal '23.14s'
WTF?
This comment is hidden because it contains spoiler information about the solution
It may seems like these katas are similar, but each of it contains unique logic of formating time. Also, the purpose of my kata is to simulate node's
console.time
. For that reason it could be interesting :)This comment is hidden because it contains spoiler information about the solution
Thanks a lot. I will add some tests later.
I think it needs more boundary tests in the fixed submisson tests.
At the moment some are covered for seconds, but not for the other units.
Also could do with boundary cases for removing of excess 0's, like 5100 returns "5.1s" and not "5.10s". These might be caught in Random tests, but not guaranteed to be.
Other than that, thought it was a nice little kata with a clear description.
Ok, I have updated the description. I hope it's clear now :)
How can users know it? It's not explained how to round the answer.
It's 70 seconds, so the expected output is 1.17m (1.17 * 1000 * 60 ~ 70000). The answer also needs to be rounded.
Loading more items...