input: def min_last_element(n: int, x: int) -> int:
      """
      Given two integers n and x, generate an array called nums of size n composed of positive integers such that for every 0 <= i < n - 1, nums[i + 1] > nums[i], and the bitwise AND of all elements in nums equals x.
  
      Return the smallest possible value of nums[n - 1].
  
      Examples:
      >>> n = 3, x = 4
      6
      >>> n = 2, x = 7
      15
  
      Constraints:
      1 <= n, x <= 10^8
      """
output:     nums = [1]
      while len(nums) < n:
          nums.append(nums[-1] + 1)
      while True:
          bitwise_and = nums[0]
          for num in nums[1:]:
              bitwise_and &= num
          if bitwise_and == x:
              return nums[-1]
          nums[-1] += 1