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.
Manually checked the log, solution is correct.
Random tests always fail with:
Cheater! :) j/k. Clever
Ah, the interepretation here is that the element to be returned is the digit not the number.
Manually writing out the list:
[1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 12345678910, 1234567891011, 123456789101112, 12345678910111213, 1234567891011121314]
Note that the 100-th element is the
9
in the1234567891011121314
group, whose last element (14
) is 105-th position in the "master" combined sequence.Note sure why
Assert::That(solve(100),Equals(1));
expects the 100-th element to be1
.What is missing in this interpretation ?
Thanks for the response.
The clarification is with the description. I wasn't sure if, for example, {2^2} is a valid sequence (sum of 1 elements). The min length of the sequence is not specified.
Either way, if min length of valid sequence is 2, then the test cases hold.
Cheers.
Clarification: legitimate sequences would be {1^2 + 2^2}, {1^2 + 2^2 + 3^2}, ..., {2^2}, {2^2 + 3^2}, {2^2 + 3^2 + 4^2}, ..., etc, right ?
If so, for n = 100 you get 5 and for n = 1000 you would get 16. Not sure if I have understood the explanation correctly. Any suggestions would be appreciated.
Then I don't get this error:
Expected: equal to Max, John and Mark like this
Actual: Max, John and Mark like this
C++: Test cases start with "equal ... ". Per instructions, this should not be there.