title: Confused about Codility demo test
body: <p>I took the <a href="http://codility.com/demo/run/" rel="nofollow noreferrer">Codility.com demo test</a>.</p>
  
  <p>My program returned the wrong value for one of the unit tests:</p>
  
  <blockquote>
    <p>TEST
    extreme_large_numbers 
    Sequence with extremly large numbers testing arithmetic overflow.</p>
    
    <p>TIME
    0.056 s.</p>
    
    <p>RESULT
    WRONG ANSWER 
    got 2, but it is not equilibrium point, sum[0..1]=4294967294, sum[3..3]=-2</p>
  </blockquote>
  
  <p>Ok, since I couldn't see the problem in my code at first, I tried running it in a Visual Studio project.  Then the compiler caught that <code>4294967294</code> was too big for an <code>int</code>.  It needs to be an <code>uint</code>, or a <code>long</code>.  So I changed everything to <code>long</code> and it worked in VS.</p>
  
  <p>However, the demo test does not let you change the function input/return types to <code>long</code>.</p>
  
  <ul>
  <li>2,147,483,647 (largest signed 32-bit int)</li>
  <li>4,294,967,294 (number given by Codility.com unit test)</li>
  </ul>
  
  <p><strong>Can someone please explain how this program can possibly work properly with <code>4294967294</code> as one of the data values in an <code>int[]</code>?</strong></p>
  
  <p><img src="https://i.stack.imgur.com/9cQUK.png" alt="alt text"></p>