Ad
  • Custom User Avatar

    Also: If you are using % modulo in your solution, beware of how negative numbers are treated and what value is computed.

  • Custom User Avatar

    Not sure why you're focusing on the number 1023. The parity of the sum of all elements is what is to be determined.

    1023 + 1 + 2 = 1026  (even)
    -1023 + 1 - 2 = -1024  (even)
    1023 + 1 + 3 = 1027  (odd)