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.
Added test
findDigit(-456, 4)
to all languages (expecting 0).The negative part is ignored and the number '4' has been declared. Since it says to count from right to left, we had to add a zero on the left side to accommodate for the nth value. So -456 become 0456. Therefore, 0 is the correct answer for the 4th position.
Change to:
In Rust
nth
is declared asusize
but negative numbers are passed.Why findDigit(-456, 4) value is return 0?
I've done about 5 Katas in my own IDE that run fine but everytime i try on this website i get EOF errors. What am i doing wrong
in Python quite some solutions would have a problem with the test below cause they ignor the case hiting the "-" at negative numbers pls add or corect me if I misunderstood the kata
Test.assert_equals(find_digit(-5540, 5), 0)