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.
lousy kata, no higher than 8 kyu
Can someone give me at least a semblance of a clue in how to solve this?
I saw the solution, it has no much to do with programming. I think this Kata is very bad designed. :(
Please don't post solution code in the discourse without a spoiler tag. If you are posting code of any sort, please format it correctly.
Use backticks for inline code snippets `like this` =>
like this
Use triple backticks for code blocks
```
Like this
```
=>
Your solution is close but your logic is not quite correct; add the following test case and see if it helps:
test.assert_equals(get_num(400), 2, "Wrong output!")
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I found more complexed pattern. Unfortunately, it passed only these initial 5 test cases, no further. Such a shame and loss of time. What could be the chances for that. So...
If the number has even number of digits:
3479283469 => 34792 | 83469 => sum A | sum B => sum B - sum A => 30 - 25 => 5
123321 => 123 | 321 => sum A | sum B => sum B - sum A => 6 - 6 => 0
If the number has odd number of digits:
90783 => 9 | 0783 => count of digits smaller than first digit => 4
300 => 3 | 00 => count of digits smaller than first digit => 2
89282350306 => 8 | 9282350306 => count of digits smaller than first digit => 8
.
solved.
python new test framework
This comment is hidden because it contains spoiler information about the solution
There are some problems with the Java translation.
I don't do Java.
Could you review it?
Because nobody reviewed it, and there is no way this is a kata issue (= a bug in the kata).
Loading more items...