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.
Since Array would start with 0, I guess to make sure the last item in marked[] will corresponed to the largest num (in abs) in the lst[]? This way if that num itself is a prime number, say 101, this prime factor, i.e. itself, will also be included in the calculation.
If you are interesting about the formula you can check this.
https://en.wikipedia.org/wiki/Arithmetic_progressionThis comment is hidden because it contains spoiler information about the solution
Hint:
1+2+3+...+10 = ( lastOfNum + firstOfNum )* howManyNum /2 = (10+1)*(10-1+1)/2 = 55