comefrom: <doocs>0477.Total Hamming Distance_1.py
code: def totalHammingDistance( nums: List[int]) -> int:
      ans = 0
      for i in range(31):
          a = b = 0
          for v in nums:
              t = (v >> i) & 1
              if t:
                  a += 1
              else:
                  b += 1
          ans += a * b
      return ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_1 = 0
      for var_2 in range ( 31 ) :
          var_4 = var_3 = 0
          for var_5 in var_0 :
              var_6 = ( var_5 >> var_2 ) & 1
              if var_6 :
                  var_4 += 1
              else :
                  var_3 += 1
          var_1 += var_4 * var_3
      return var_1
  