| CAMA 2024 |
|---|
| Finished |
You are given $$$l$$$ and $$$r$$$ and you are asked to calculate the number pairs $$$(a, b)$$$ in that interval interval such that $$$a \lt b$$$, $$$a \oplus b \gt b$$$ and $$$l \le a, b \le r$$$.
Here $$$\oplus$$$ denotes XOR bitwise operation.
If you are unfamiliar with XOR, please visit Esomer's XOR ultimate guide.
The first line contains an integer $$$t$$$, $$$(1 \le t \le 10^5)$$$ — the number of test cases.
The first line of each test case contains two integers $$$l$$$, $$$r$$$, $$$(1 \le l \le r \le 10^9)$$$.
You should print the number of pairs that fulfil those conditions.
44 81 28 152 6
4 1 0 4
| Name |
|---|


