Given an array nums consisting of prime numbers, construct an array ans of the same length.
For each index i, ans[i] must be the minimum non negative integer such that ans[i] ext{ OR } (ans[i] + 1) = nums[i]. If no such integer exists for an index i, set ans[i] to
Return the array ans.
Constraints:
nums.length
nums[i]
nums[i] is a prime number.
Given an array nums consisting of prime numbers, construct an array ans of the same length.
For each index i, ans[i] must be the minimum non negative integer such that ans[i] ext{ OR } (ans[i] + 1) = nums[i]. If no such integer exists for an index i, set ans[i] to
Return the array ans.
Constraints:
nums.length
nums[i]
nums[i] is a prime number.