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.
Thanks! I get it now
There is no decimal part, so no
.0
. You choose the greater prefix you actually exceed:100,000 ohms
don't exceed 1Mohms => 100k ohms100,000,000 ohms
exceed 1kohms and 1Mohms, choose the greater => 100M ohmsCould anyone help me with the prefix part? How does it choose k vs M? Also, in cases of 5.0, how is the '.0' eliminated?
Fastest - avg 0.5μs
Random test cases are generating negative numbers in Golang version (as said below), but even more: test fails both if you convert negative numbers to positive (-number) and if you work with them as negative values...
8 -> 1000 -> true
15 -> 1111 -> false
???
Could you add a link to some page where the roman numerals are fully explained?
I had a couple of doubts... so many years since I was taught this at school... x_x
Beauteous
Oh right - I missed that part. Thanks for pointing it out.
Seems you didn't try it by yourself.
Take a look at line 5
It sets a default value for
color[3]
-thus default value fortolerance
- even if none is passed.This line will fail: tolerance = code[colors[3]]
if there is no tolerance provided ('index out of range')
are you using print instead of return?