Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I withdrew the "elements of integers" part as "whose" is likely referring to the array, but the other points stand.

  • Custom User Avatar

    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."

  • Custom User Avatar

    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.