Company: Razorpay
Difficulty: medium
# Sum of Bitwise AND Over All Subarrays Given an array `A` of `N` positive integers, find the sum of the bitwise AND values of every non-empty contiguous subarray. ## Input Format - The first line contains `N`. - The second line contains `N` space-separated integers. ## Output Format Print one integer denoting the sum. ## Constraints - `1 <= N <= 100000` - `1 <= A[i] <= 1000000000` - The answer requires 64-bit integer arithmetic. ## Example Input: 3 1 2 3 Output: 8 ## Notes - Only non-empty subarrays are included. - Equal subarrays at different positions are counted separately.