title: Int instead of Long, bug?
body: <p>I was performing a taks at Codility (it's content is in links below).
  I can't understand why it gives different results:</p>
  
  <p>1) <a href="https://codility.com/demo/results/trainingFH5VPC-SKD/" rel="nofollow">80%</a></p>
  
  <pre><code>public int solution(int[] A)
  {
      long total = ((2+A.Length)*(A.Length+1)/2);
      long sum=0L;
  
      for(int i=0;i&lt;A.Length;i++)
      {
          sum+=A[i];
      }
  
      return (int)(total-sum);
  }
  </code></pre>
  
  <p>2) <a href="https://codility.com/demo/results/trainingUVM6GD-2KD/" rel="nofollow">100%</a></p>
  
  <pre><code>public int solution(int[] A)
  {
      long N=A.Length+1;
      long total = N*(N+1)/2;
      long sum=0L;
  
      for(int i=0;i&lt;A.Length;i++)
      {
          sum+=A[i];
      }
  
      return (int)(total-sum);
  }
  </code></pre>
  
  <p>It seems like it treats the result as System.Int32 and it is System.Int64, I've checked it in VS. Is it a bug, or am I missing something?</p>