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.
I agree it should be there in the question.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
So, in other words, is there a natural number n such that sum of cubes of first n natural numbers equals m?
essentially what the question is asking you is:
following the sequence n^3 + (n-1)^3 + (n-2)^3 ... 1^3, is there a value, n, you can put in such that the summation of the sequence == m (m is the parameter).
if there is none, return -1. Your work is to find n (if there is).
.....
your first two tests are correct. three is also correct, but you don't have to repeat.
This comment is hidden because it contains spoiler information about the solution