Problem Description
You are given an integer A. Find the number of ordered pairs (x, y) such that 0 ≤ x, y < 2A and they satisfy the following condition-
(x ^ y) = (x | y).
In other words, the bitwise XOR of both these numbers is equal to the bitwise OR of these numbers. Since the answer can be large, calculate it modulo 109 + 7.
0 <= A <= 105
Input 1:
0
Input 2:
1
Output 1:
1
Output 2:
3
Explanation 1:
Valid pair - (0, 0)
Explanation 2:
Valid pairs - (0, 0), (0, 1), (1, 0)
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.