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.
This is the most clever answer I've ever seen...
Yes, my first attempt relied on Math.Round(x, MidpointRounding.AwayFromZero), that is absolutely correct mathematically. I am always upset when I have to adjust the right solution to the wrong tests.
This comment is hidden because it contains spoiler information about the solution
This solution returns 8 if n=0, which is wrong. n=0 isn't forbidden in the description, maybe the testcases should be updated.
whoa, that's brutal...
Apparently the Kata editor only validates the full tests - the example tests aren't validated/executed at all. That's why I missed that problem.
Moved the function to preloaded - should be working now with full tests and example tests.
Thank you guys, I learned something today ;)
In c#, example tests still no doTest ;-)
Put it to preload block?
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
The example tests in C# are full of problems. There is no method "doTest" and in the example tests the method problem is expeceted to have a capital P.
The real tests work without any problem.
Approved
You're right - anybody can rename these. I just meant it'd be nicer if the prepared names are 'meaningful'. It's good practice - and authors should lead by example, especially in a fundamental (beginner level) kata ;)
There is no 'correct' return value - there are many. To be more precise:
(9 * NoOfDigitsInResult) - 1
many. (-1 because the leftmost digit mustn't be 0)
Translated to C#.
Agreed, but you are free to use whatever variable names you want - just edit the initial solution :D
Loading more items...