You are given an array nums consisting of prime integers.
You need to construct an array ans of the same length, where ans[i] is the smallest non negative integer that satisfies ans[i] | (ans[i] + 1) == nums[i], where | denotes the bitwise OR operator. If no such value exists for a given index i, set ans[i] to
Return the array ans.
Constraints:
nums.length
nums[i]
nums[i] is a prime number.
You are given an array nums consisting of prime integers.
You need to construct an array ans of the same length, where ans[i] is the smallest non negative integer that satisfies ans[i] | (ans[i] + 1) == nums[i], where | denotes the bitwise OR operator. If no such value exists for a given index i, set ans[i] to
Return the array ans.
Constraints:
nums.length
nums[i]
nums[i] is a prime number.