comefrom: <doocs>2401.Longest Nice Subarray_1.py
code: def longestNiceSubarray( nums: List[int]) -> int:
      ans = j = t = 0
      for i, v in enumerate(nums):
          while t & v:
              t ^= nums[j]
              j += 1
          t |= v
          ans = max(ans, i - j + 1)
      return ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_3 = var_1 = var_2 = 0
      for var_4 , var_5 in enumerate ( var_0 ) :
          while var_2 & var_5 :
              var_2 ^= var_0 [ var_1 ]
              var_1 += 1
          var_2 |= var_5
          var_3 = max ( var_3 , var_4 - var_1 + 1 )
      return var_3
  