Ad
  • Custom User Avatar

    hahaha, bro took the role of god to a whole new level

  • Custom User Avatar

    Drunk? my boy is as high as the clouds hahaha

  • Custom User Avatar

    yeah tnx, I was using % and that was having this behavior u said

  • 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)
    
  • Custom User Avatar

    Using javascript, the "1023" number is being considered "EVEN" in the cases: [ 1023, 1, 2 ], [ -1023, 1, -2 ]. but the [ 1023, 1, 3 ] is "ODD"?
    I don't think it might be right, if it's the case please tell me why, 'cause I can't understand why only this number is breaking my code... all the other tests was success, only the "1023" cases has reversed values...

    If Im tottaly wrong, please disregard the comment and my bad for that.