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 comment is hidden because it contains spoiler information about the solution
I withdrew the "elements of integers" part as "whose" is likely referring to the array, but the other points stand.
The description is extremely unclear.
"You will be given an array of integers whose elements have both a negative and a positive value, except for one integer that is either only negative or only positive."
In this sentence are such gems as "elements" which "have both a negative and a positive value", "except for one integer that is either only negative or only positive" (weird, I thought all nonzero integers are like that!)
I propose:
"You will be given an array of integers such that, for any integer
x
in the array, there exists exactly one integer equal to-x
in the array. There is one exception, an integer that does not have such a complement. You need to find it."You need to calculate the infinite sum (first term is n, each following term is the previous term integer-divided by 2), not just the sum of the first five terms.