title: int vs int32 return value
body: <p>I am running into an issue, which seems to be related to <code>int32</code> vs <code>int</code> data type. My program is returning different values on different environments. </p>
  
  <p>For example, on go playground, I notice the value returned is -4 (which is expected value). But the same on Leetcode with same input returns a value of 4294967292. While it returned this value, when I print it, I get -4 (see output added later). </p>
  
  <p>I tried casting to <code>int32(res)</code> but didn't help. Also didn't find any directly related in textbook. Please help me understand why this is different on go playground vs Leetcode.</p>
  
  <p><a href="https://play.golang.org/p/qXMd9frlhbe" rel="nofollow noreferrer">https://play.golang.org/p/qXMd9frlhbe</a></p>
  
  <pre><code>package main
  
  import (
      "fmt"
  )
  
  func main() {
      fmt.Printf("%v", singleNumber([]int{-2,-2,1,1,-3,1,-3,-3,-4,-2}))
  }
  
  func singleNumber(nums []int) int {
      sum := make([]int, 32)
  
      for _, v := range nums {
          for i := 0; i &lt; 32; i++ {
              if sum[i] != 0 {
                  sum[i] += 1 &amp; (v &gt;&gt; uint32(i))
              } else {
                  sum[i] = 1 &amp; (v &gt;&gt; uint32(i))
              }
          }
      }
  
      res := 0 
      for k, v := range sum {
          if (v%3) != 0 {
              res |= (v%3) &lt;&lt; uint32(k) 
          }
      }
      fmt.Printf("res %+v\n", res)
      return res
  }
  </code></pre>
  
  <p>Same on Leetcode gives the output: </p>
  
  <pre><code>Input:
  [-2,-2,1,1,-3,1,-3,-3,-4,-2]
  Output:
  4294967292
  Expected:
  -4
  Stdout:
  res -4
  </code></pre>